encode<V> static method
Implementation
static V encode<V>(
CustomerBankTransfer instance,
Encoder<V> encoder,
) {
final container = encoder.container<String>();
if (instance.euBankTransfer != null) {
SessionEuBankTransfer.encode(
instance.euBankTransfer!,
container.nestedSingleValueContainer('eu_bank_transfer').encoder,
);
}
if (instance.requestedAddressTypes != null) {
container.encodeList(
'requested_address_types',
(container) => instance.requestedAddressTypes!
.forEach((el) => container.encodeString(el)),
);
}
CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransferType
.encode(
instance.type,
container.nestedSingleValueContainer('type').encoder,
);
return container.value;
}