QuickbooksVendor.fromMap constructor

QuickbooksVendor.fromMap(
  1. Map<String, dynamic> map
)

Implementation

factory QuickbooksVendor.fromMap(Map<String, dynamic> map) {
  return QuickbooksVendor(
    id: map['Id'],
    syncToken: map['SyncToken'],
    title: map['Title'],
    givenName: map['GivenName'],
    middleName: map['MiddleName'],
    familyName: map['FamilyName'],
    suffix: map['Suffix'],
    companyName: map['CompanyName'],
    displayName: map['DisplayName'],
    printOnCheckName: map['PrintOnCheckName'],
    primaryEmailAddr: map['PrimaryEmailAddr'] != null
        ? QuickbooksEmailAddress.fromMap(
            map['PrimaryEmailAddr'] as Map<String, dynamic>)
        : null,
    otherContactInfo: map['OtherContactInfo'] != null
        ? QuickbooksContactInfos.fromMap(
            map['OtherContactInfo'] as Map<String, dynamic>)
        : null,
    apAccountRef: map['APAAccountRef'] != null
        ? QuickbooksReferenceType.fromMap(
            map['APAccountRef'] as Map<String, dynamic>)
        : null,
    termRef: map['TermRef'] != null
        ? QuickbooksReferenceType.fromMap(
            map['TermRef'] as Map<String, dynamic>)
        : null,
    source: map['Source'],
    gstin: map['GSTIN'],
    t4aEligible: map['T4AEligible'],
    fax: map['Fax'] != null
        ? QuickbooksPhoneNumber.fromMap(map['Fax'] as Map<String, dynamic>)
        : null,
    businessNumber: map['BusinessNumber'],
    currencyRef: map['CurrencyRef'] != null
        ? QuickbooksReferenceType.fromMap(
            map['CurrencyRef'] as Map<String, dynamic>)
        : null,
    hasTPAR: map['HasTPAR'],
    taxReportingBasis: map['TaxReportingBasis'],
    mobile: map['Mobile'] != null
        ? QuickbooksPhoneNumber.fromMap(map['Mobile'] as Map<String, dynamic>)
        : null,
    primaryPhone: map['PrimaryPhone'] != null
        ? QuickbooksPhoneNumber.fromMap(
            map['PrimaryPhone'] as Map<String, dynamic>)
        : null,
    active: map['Active'],
    alternatePhone: map['AlternatePhone'] != null
        ? QuickbooksPhoneNumber.fromMap(
            map['AlternatePhone'] as Map<String, dynamic>)
        : null,
    metaData: map['MetaData'],
    vendor1099: map['Vendor1099'],
    costRate: double.tryParse(map['CostRate'].toString()),
    billRate: double.tryParse(map['BillRate'].toString()),
    webAddr: map['WebAddr'] != null
        ? QuickbooksWebAddress.fromMap(map['WebAddr'] as Map<String, dynamic>)
        : null,
    t5018Eligible: map['T5018Eligible'],
    vendorPaymentBankDetail: map['VendorPaymentBankDetail'] != null
        ? QuickbooksVendorPaymentBankDetail.fromMap(
            map['VendorPaymentBankDetail'] as Map<String, dynamic>)
        : null,
    taxIdentifier: map['TaxIdentifier'],
    acctNum: map['AcctNum'],
    gstRegistrationType: map['GSTRegistrationType'],
    billAddr: map['BillAddr'] != null
        ? QuickbooksPhysicalAddress.fromMap(
            map['BillAddr'] as Map<String, dynamic>)
        : null,
    balance: double.tryParse(map['Balance'].toString()),
  );
}