fromMap static method

RefundUpdated? fromMap(
  1. Object? body
)

Implementation

static RefundUpdated? fromMap(Object? body) {
  final source = readRecord(body, envelopeKey: 'refund');
  if (source == null) return null;
  return RefundUpdated(
    account: RefundUpdatedAccount.fromMap(source['account']),
    amount: readText(source['amount']),
    createdBy: readText(source['created_by']),
    createdOn: readText(source['created_on']),
    creditNote: RefundUpdatedCreditNote.fromMap(source['credit_note']),
    creditNoteId: readText(source['credit_note_id']),
    customAttributes: readList<Object>(source['custom_attributes'], readAny),
    gatewayResponse: readText(source['gateway_response']),
    id: readText(source['id']),
    issueDate: readText(source['issue_date']),
    lastUpdatedBy: readText(source['last_updated_by']),
    lastUpdatedOn: readText(source['last_updated_on']),
    note: readText(source['note']),
    object: readText(source['object']),
    paymentMethod: readText(source['payment_method']),
    paymentProcessor: readText(source['payment_processor']),
    reconcileStatus: readText(source['reconcile_status']),
    reference: readText(source['reference']),
    status: readText(source['status']),
    uuid: readText(source['uuid']),
    version: readInteger(source['version']),
  );
}