encode<V> static method
Implementation
static V encode<V>(
OutboundTransfersPaymentMethodDetails instance,
Encoder<V> encoder,
) {
final container = encoder.container<String>();
TreasurySharedResourceBillingDetails.encode(
instance.billingDetails,
container.nestedSingleValueContainer('billing_details').encoder,
);
container.encodeString(
'type',
'us_bank_account',
);
if (instance.usBankAccount != null) {
OutboundTransfersPaymentMethodDetailsUsBankAccount.encode(
instance.usBankAccount!,
container.nestedSingleValueContainer('us_bank_account').encoder,
);
}
return container.value;
}