fromMap static method
Implementation
static AccountPaymentsData? fromMap(Object? body) {
final source = readRecord(body);
if (source == null) return null;
return AccountPaymentsData(
account: AccountPaymentsDataAccount.fromMap(source['account']),
createdBy: AccountPaymentsDataCreatedBy.fromMap(source['created_by']),
createdOn: readText(source['created_on']),
creditApplied: readList<AccountPaymentsDataCreditApplied>(
source['credit_applied'], AccountPaymentsDataCreditApplied.fromMap),
giftCertificateApplied:
readList<AccountPaymentsDataGiftCertificateApplied>(
source['gift_certificate_applied'],
AccountPaymentsDataGiftCertificateApplied.fromMap),
id: readText(source['id']),
invoices: readList<AccountPaymentsDataInvoice>(
source['invoices'], AccountPaymentsDataInvoice.fromMap),
lastUpdatedBy: readAny(source['last_updated_by']),
lastUpdatedOn: readAny(source['last_updated_on']),
object: readText(source['object']),
origin: readAny(source['origin']),
paymentApplied: readList<AccountPaymentsDataPaymentApplied>(
source['payment_applied'], AccountPaymentsDataPaymentApplied.fromMap),
paymentNote: readText(source['payment_note']),
reconcileStatus: readText(source['reconcile_status']),
status: readText(source['status']),
version: readInteger(source['version']),
);
}