fromMap static method
Implementation
static PurchaseOrderPurchasePayment? fromMap(Object? body) {
final source = readRecord(body);
if (source == null) return null;
return PurchaseOrderPurchasePayment(
account: PurchaseOrderPurchasePaymentAccount.fromMap(source['account']),
code: readText(source['code']),
createdBy:
PurchaseOrderPurchasePaymentCreatedBy.fromMap(source['created_by']),
createdOn: readText(source['created_on']),
creditNoteApplications:
readList<PurchaseOrderPurchasePaymentCreditNoteApplication>(
source['credit_note_applications'],
PurchaseOrderPurchasePaymentCreditNoteApplication.fromMap),
creditNoteTotal: readText(source['credit_note_total']),
currency:
PurchaseOrderPurchasePaymentCurrency.fromMap(source['currency']),
href: readText(source['href']),
id: readText(source['id']),
lastUpdatedBy: PurchaseOrderPurchasePaymentLastUpdatedBy.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<PurchaseOrderPurchasePaymentPaymentMethodApplication>(
source['payment_method_applications'],
PurchaseOrderPurchasePaymentPaymentMethodApplication.fromMap),
paymentNote: readText(source['payment_note']),
paymentReference: readAny(source['payment_reference']),
purchaseInvoiceApplications:
readList<PurchaseOrderPurchasePaymentPurchaseInvoiceApplication>(
source['purchase_invoice_applications'],
PurchaseOrderPurchasePaymentPurchaseInvoiceApplication.fromMap),
status: readText(source['status']),
version: readInteger(source['version']),
);
}