TreasuryTransactionsResourceFlowDetails.fromJson constructor

TreasuryTransactionsResourceFlowDetails.fromJson(
  1. Object? json
)

Implementation

factory TreasuryTransactionsResourceFlowDetails.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return TreasuryTransactionsResourceFlowDetails(
    creditReversal: map['credit_reversal'] == null
        ? null
        : TreasuryCreditReversal.fromJson(map['credit_reversal']),
    debitReversal: map['debit_reversal'] == null
        ? null
        : TreasuryDebitReversal.fromJson(map['debit_reversal']),
    inboundTransfer: map['inbound_transfer'] == null
        ? null
        : TreasuryInboundTransfer.fromJson(map['inbound_transfer']),
    issuingAuthorization: map['issuing_authorization'] == null
        ? null
        : IssuingAuthorization.fromJson(map['issuing_authorization']),
    outboundPayment: map['outbound_payment'] == null
        ? null
        : TreasuryOutboundPayment.fromJson(map['outbound_payment']),
    outboundTransfer: map['outbound_transfer'] == null
        ? null
        : TreasuryOutboundTransfer.fromJson(map['outbound_transfer']),
    receivedCredit: map['received_credit'] == null
        ? null
        : TreasuryReceivedCredit.fromJson(map['received_credit']),
    receivedDebit: map['received_debit'] == null
        ? null
        : TreasuryReceivedDebit.fromJson(map['received_debit']),
    type: TreasuryTransactionFlowDetailsType.fromJson(map['type']),
  );
}