fromMap static method

CreditNoteApplication? fromMap(
  1. Object? body
)

Implementation

static CreditNoteApplication? fromMap(Object? body) {
  final source = readRecord(body);
  if (source == null) return null;
  return CreditNoteApplication(
    amount: readAny(source['amount']),
    createdBy: readAny(source['created_by']),
    createdOn: readText(source['created_on']),
    creditNote:
        CreditNoteApplicationCreditNote.fromMap(source['credit_note']),
    creditNoteId: readText(source['credit_note_id']),
    date: readText(source['date']),
    href: readText(source['href']),
    id: readText(source['id']),
    issueDate: readText(source['issue_date']),
    lastUpdatedBy: readAny(source['last_updated_by']),
    lastUpdatedOn: readText(source['last_updated_on']),
    object: readText(source['object']),
    payment: CreditNoteApplicationPayment.fromMap(source['payment']),
    paymentId: readText(source['payment_id']),
    primaryid: readInteger(source['primaryId']),
    refund: CreditNoteApplicationRefund.fromMap(source['refund']),
    refundId: readText(source['refund_id']),
    remainingBalance: readAny(source['remaining_balance']),
    status: readText(source['status']),
    uuid: readText(source['uuid']),
    version: readAny(source['version']),
  );
}