encode<V> static method
Implementation
static V encode<V>(
TreasuryTransactionsResourceFlowDetails instance,
Encoder<V> encoder,
) {
final container = encoder.container<String>();
if (instance.creditReversal != null) {
TreasuryCreditReversal.encode(
instance.creditReversal!,
container.nestedSingleValueContainer('credit_reversal').encoder,
);
}
if (instance.debitReversal != null) {
TreasuryDebitReversal.encode(
instance.debitReversal!,
container.nestedSingleValueContainer('debit_reversal').encoder,
);
}
if (instance.inboundTransfer != null) {
TreasuryInboundTransfer.encode(
instance.inboundTransfer!,
container.nestedSingleValueContainer('inbound_transfer').encoder,
);
}
if (instance.issuingAuthorization != null) {
IssuingAuthorization.encode(
instance.issuingAuthorization!,
container.nestedSingleValueContainer('issuing_authorization').encoder,
);
}
if (instance.outboundPayment != null) {
TreasuryOutboundPayment.encode(
instance.outboundPayment!,
container.nestedSingleValueContainer('outbound_payment').encoder,
);
}
if (instance.outboundTransfer != null) {
TreasuryOutboundTransfer.encode(
instance.outboundTransfer!,
container.nestedSingleValueContainer('outbound_transfer').encoder,
);
}
if (instance.receivedCredit != null) {
TreasuryReceivedCredit.encode(
instance.receivedCredit!,
container.nestedSingleValueContainer('received_credit').encoder,
);
}
if (instance.receivedDebit != null) {
TreasuryReceivedDebit.encode(
instance.receivedDebit!,
container.nestedSingleValueContainer('received_debit').encoder,
);
}
TreasuryTransactionFlowDetailsType.encode(
instance.type,
container.nestedSingleValueContainer('type').encoder,
);
return container.value;
}