encode<V> static method
V
encode<V>(
- TreasuryReceivedCreditsResourceLinkedFlowsSourceFlowDetails instance,
- Encoder<
V> encoder
Implementation
static V encode<V>(
TreasuryReceivedCreditsResourceLinkedFlowsSourceFlowDetails instance,
Encoder<V> encoder,
) {
final container = encoder.container<String>();
if (instance.creditReversal != null) {
TreasuryCreditReversal.encode(
instance.creditReversal!,
container.nestedSingleValueContainer('credit_reversal').encoder,
);
}
if (instance.outboundPayment != null) {
TreasuryOutboundPayment.encode(
instance.outboundPayment!,
container.nestedSingleValueContainer('outbound_payment').encoder,
);
}
if (instance.payout != null) {
Payout.encode(
instance.payout!,
container.nestedSingleValueContainer('payout').encoder,
);
}
container.encodeString(
'type',
instance.type,
);
return container.value;
}