toMap method

Map<String, dynamic> toMap({
  1. bool withId = true,
})

Implementation

Map<String, dynamic> toMap({bool withId = true}) {
  return <String, dynamic>{
    if (withId) 'Id': id,
    'TotalAmt': totalAmt,
    'CustomerRef': customerRef.toMap(),
    'SyncToken': syncToken,
    'CurrencyRef': currencyRef?.toMap(),
    'PrivateNote': privateNote,
    'PaymentMethodRef': paymentMethodRef?.toMap(),
    'UnappliedAmt': unappliedAmt,
    'DepositToAccountRef': depositToAccountRef?.toMap(),
    'ExchangeRate': exchangeRate,
    'Line': line?.map((x) => x.toMap()).toList(),
    'TxnSource': txnSource,
    'ARAccountRef': ARAccountRef?.toMap(),
    'TxnDate': txnDate?.toString(),
    'CreditCardPayment': creditCardPayment?.toMap(),
    'TransactionLocationType': transactionLocationType,
    'MetaData': metaData,
    'PaymentRefNum': paymentRefNum,
    'TaxExemptionRef': taxExemptionRef?.toMap(),
    'Active': active,
  };
}