encode<V> static method
Implementation
static V encode<V>(
InboundTransfersPaymentMethodDetailsUsBankAccount instance,
Encoder<V> encoder,
) {
final container = encoder.container<String>();
if (instance.accountHolderType != null) {
container.encodeString(
'account_holder_type',
instance.accountHolderType!,
);
}
if (instance.accountType != null) {
container.encodeString(
'account_type',
instance.accountType!,
);
}
if (instance.bankName != null) {
container.encodeString(
'bank_name',
instance.bankName!,
);
}
if (instance.fingerprint != null) {
container.encodeString(
'fingerprint',
instance.fingerprint!,
);
}
if (instance.last4 != null) {
container.encodeString(
'last4',
instance.last4!,
);
}
if (instance.mandate != null) {
MandateOrId.encode(
instance.mandate!,
container.nestedSingleValueContainer('mandate').encoder,
);
}
container.encodeString(
'network',
'ach',
);
if (instance.routingNumber != null) {
container.encodeString(
'routing_number',
instance.routingNumber!,
);
}
return container.value;
}