QuickbooksAccount.fromMap constructor
QuickbooksAccount.fromMap(
- Map<String, dynamic> map
)
Implementation
factory QuickbooksAccount.fromMap(Map<String, dynamic> map) {
return QuickbooksAccount(
id: map['Id'],
name: map['Name'],
syncToken: map['SyncToken'],
acctNum: map['AcctNum'],
parentRef: map['ParentRef'] != null
? QuickbooksReferenceType.fromMap(
map['ParentRef'] as Map<String, dynamic>)
: null,
currencyRef: map['CurrencyRef'] != null
? QuickbooksReferenceType.fromMap(
map['CurrencyRef'] as Map<String, dynamic>)
: null,
description: map['Description'],
active: map['Active'],
metaData: map['MetaData'],
subAccount: map['SubAccount'],
classification: map['Classification'],
fullyQualifiedName: map['FullyQualifiedName'],
txnLocationType: map['TxnLocationType'],
accountType: map['AccountType'],
currentBalance: double.tryParse(map['CurrentBalance'].toString()),
currentBalanceWithSubAccounts:
double.tryParse(map['CurrentBalanceWithSubAccounts'].toString()),
accountAlias: map['AccountAlias'],
taxCodeRef: map['TaxCodeRef'] != null
? QuickbooksReferenceType.fromMap(
map['TaxCodeRef'] as Map<String, dynamic>)
: null,
accountSubType: map['AccountSubType'],
);
}