toMap method
Implementation
Map<String, dynamic> toMap({bool withId = true}) {
return <String, dynamic>{
if (withId) 'Id': id,
'SyncToken': syncToken,
'DisplayName': displayName,
'Title': title,
'GivenName': givenName,
'MiddleName': middleName,
'Suffix': suffix,
'FamilyName': familyName,
'PrimaryEmailAddr': primaryEmailAddr?.toMap(),
'ResaleNum': resaleNum,
'SecondaryTaxIdentifier': secondaryTaxIdentifier,
'ARAccountRef': ARAccountRef?.toMap(),
'DefaultTaxCodeRef': defaultTaxCodeRef?.toMap(),
'PreferredDeliveryMethod': preferredDeliveryMethod,
'GSTIN': GSTIN,
'SalesTermRef': salesTermRef?.toMap(),
'CustomerTypeRef': customerTypeRef,
'Fax': fax?.toMap(),
'BusinessNumber': businessNumber,
'BillWithParent': billWithParent,
'CurrencyRef': currencyRef?.toMap(),
'Mobile': mobile?.toMap(),
'Job': job,
'BalanceWithJobs': balanceWithJobs,
'PrimaryPhone': primaryPhone?.toMap(),
'OpenBalanceDate': openBalanceDate?.toString(),
'Taxable': taxable,
'AlternatePhone': alternatePhone?.toMap(),
'MetaData': metaData,
'ParentRef': parentRef?.toMap(),
'Notes': notes,
'WebAddr': webAddr?.toMap(),
'Active': active,
'CompanyName': companyName,
'Balance': balance,
'ShipAddr': shipAddr?.toMap(),
'PaymentMethodRef': paymentMethodRef?.toMap(),
'IsProject': isProject,
'Source': source,
'PrimaryTaxIdentifier': primaryTaxIdentifier,
'GSTRegistrationType': GSTRegistrationType,
'PrintOnCheckName': printOnCheckName,
'BillAddr': billAddr?.toMap(),
'FullyQualifiedName': fullyQualifiedName,
'Level': level,
'TaxExemptionReasonId': taxExemptionReasonId,
};
}