fromMap static method
Implementation
static Payment? fromMap(Object? body) {
final source = readRecord(body);
if (source == null) return null;
return Payment(
account: PaymentAccount.fromMap(source['account']),
createdBy: PaymentCreatedBy.fromMap(source['created_by']),
createdOn: readText(source['created_on']),
creditApplied: readList<PaymentCreditApplied>(
source['credit_applied'], PaymentCreditApplied.fromMap),
giftCertificateApplied: readList<PaymentGiftCertificateApplied>(
source['gift_certificate_applied'],
PaymentGiftCertificateApplied.fromMap),
id: readText(source['id']),
invoices:
readList<PaymentInvoice>(source['invoices'], PaymentInvoice.fromMap),
lastUpdatedBy: PaymentLastUpdatedBy.fromMap(source['last_updated_by']),
lastUpdatedOn: readText(source['last_updated_on']),
object: readText(source['object']),
origin: readText(source['origin']),
paymentApplied: readList<PaymentPaymentApplied>(
source['payment_applied'], PaymentPaymentApplied.fromMap),
paymentNote: readText(source['payment_note']),
reconcileStatus: readText(source['reconcile_status']),
status: readText(source['status']),
version: readInteger(source['version']),
);
}