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,
    'SyncToken': syncToken,
    'Title': title,
    'GivenName': givenName,
    'MiddleName': middleName,
    'FamilyName': familyName,
    'Suffix': suffix,
    'CompanyName': companyName,
    'DisplayName': displayName,
    'PrintOnCheckName': printOnCheckName,
    'PrimaryEmailAddr': primaryEmailAddr?.toMap(),
    'OtherContactInfo': otherContactInfo?.toMap(),
    'APAccountRef': apAccountRef?.toMap(),
    'TermRef': termRef?.toMap(),
    'Source': source,
    'GSTIN': gstin,
    'T4AEligible': t4aEligible,
    'Fax': fax?.toMap(),
    'BusinessNumber': businessNumber,
    'CurrencyRef': currencyRef?.toMap(),
    'HasTPAR': hasTPAR,
    'TaxReportingBasis': taxReportingBasis,
    'Mobile': mobile?.toMap(),
    'PrimaryPhone': primaryPhone?.toMap(),
    'Active': active,
    'AlternatePhone': alternatePhone?.toMap(),
    'MetaData': metaData,
    'Vendor1099': vendor1099,
    'CostRate': costRate,
    'BillRate': billRate,
    'WebAddr': webAddr?.toMap(),
    'T5018Eligible': t5018Eligible,
    'VendorPaymentBankDetail': vendorPaymentBankDetail?.toMap(),
    'TaxIdentifier': taxIdentifier,
    'AcctNum': acctNum,
    'GSTRegistrationType': gstRegistrationType,
    'BillAddr': billAddr?.toMap(),
    'Balance': balance,
  };
}