fromMap static method
Implementation
static Refund? fromMap(Object? body) {
final source = readRecord(body, envelopeKey: 'refund');
if (source == null) return null;
return Refund(
account: RefundAccount.fromMap(source['account']),
amount: readText(source['amount']),
createdBy: readText(source['created_by']),
createdOn: readText(source['created_on']),
creditNote: RefundCreditNote.fromMap(source['credit_note']),
customAttributes: readList<Object>(source['custom_attributes'], readAny),
gatewayResponse: readAny(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: readAny(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']),
);
}