encode<V> static method
Implementation
static V encode<V>(
TreasuryFinancialAccountsResourceFinancialAddress instance,
Encoder<V> encoder,
) {
final container = encoder.container<String>();
if (instance.aba != null) {
TreasuryFinancialAccountsResourceAbaRecord.encode(
instance.aba!,
container.nestedSingleValueContainer('aba').encoder,
);
}
if (instance.supportedNetworks != null) {
container.encodeList(
'supported_networks',
(container) => instance.supportedNetworks!.forEach((el) =>
OutboundPaymentsPaymentMethodDetailsUsBankAccountNetwork.encode(
el,
container.nestedSingleValueContainer().encoder,
)),
);
}
container.encodeString(
'type',
'aba',
);
return container.value;
}