fromMap static method
Implementation
static PurchasePaymentUpdated? fromMap(Object? body) {
final source = readRecord(body, envelopeKey: 'purchase_payment');
if (source == null) return null;
return PurchasePaymentUpdated(
account: PurchasePaymentUpdatedAccount.fromMap(source['account']),
activityLogs: readList<Object>(source['activity_logs'], readAny),
code: readText(source['code']),
createdBy: PurchasePaymentUpdatedCreatedBy.fromMap(source['created_by']),
createdOn: readText(source['created_on']),
creditNoteApplications:
readList<Object>(source['credit_note_applications'], readAny),
creditNoteTotal: readText(source['credit_note_total']),
currency: PurchasePaymentUpdatedCurrency.fromMap(source['currency']),
customAttributes: readList<Object>(source['custom_attributes'], readAny),
customObjects: readList<Object>(source['custom_objects'], readAny),
href: readText(source['href']),
id: readText(source['id']),
lastUpdatedBy: PurchasePaymentUpdatedLastUpdatedBy.fromMap(
source['last_updated_by']),
lastUpdatedOn: readText(source['last_updated_on']),
object: readText(source['object']),
origin: readText(source['origin']),
paidTotal: readText(source['paid_total']),
paymentDate: readText(source['payment_date']),
paymentMethodApplications:
readList<PurchasePaymentUpdatedPaymentMethodApplication>(
source['payment_method_applications'],
PurchasePaymentUpdatedPaymentMethodApplication.fromMap),
paymentNote: readText(source['payment_note']),
paymentReference: readAny(source['payment_reference']),
purchaseCreditApplied:
readList<Object>(source['purchase_credit_applied'], readAny),
purchaseInvoiceApplications:
readList<PurchasePaymentUpdatedPurchaseInvoiceApplication>(
source['purchase_invoice_applications'],
PurchasePaymentUpdatedPurchaseInvoiceApplication.fromMap),
purchaseInvoices: readList<Object>(source['purchase_invoices'], readAny),
purchaseOrderId: readText(source['purchase_order_id']),
purchasePaymentApplied:
readList<Object>(source['purchase_payment_applied'], readAny),
purchasePaymentDate: readText(source['purchase_payment_date']),
purchasePaymentNote: readText(source['purchase_payment_note']),
status: readText(source['status']),
totalApplied: readText(source['total_applied']),
uuid: readText(source['uuid']),
version: readInteger(source['version']),
);
}