fromMap static method

PurchaseRefunds? fromMap(
  1. Object? body
)

Implementation

static PurchaseRefunds? fromMap(Object? body) {
  final source = readRecord(body);
  if (source == null) return null;
  return PurchaseRefunds(
    alternateDate: readText(source['alternate_date']),
    amount: readText(source['amount']),
    createdBy: readText(source['created_by']),
    createdOn: readText(source['created_on']),
    creditNoteId: readText(source['credit_note_id']),
    customAttributes: readList<Object>(source['custom_attributes'], readAny),
    data: readList<PurchaseRefundsData>(
        source['data'], PurchaseRefundsData.fromMap),
    date: readText(source['date']),
    id: readText(source['id']),
    lastUpdatedBy: readText(source['last_updated_by']),
    lastUpdatedOn: readText(source['last_updated_on']),
    note: readText(source['note']),
    object: readText(source['object']),
    pagination: Pagination.fromMap(source['pagination']),
    paymentMethod: readText(source['payment_method']),
    paymentProcessor: readText(source['payment_processor']),
    reference: readText(source['reference']),
    status: readText(source['status']),
    url: readText(source['url']),
    uuid: readText(source['uuid']),
    version: readText(source['version']),
  );
}