encode<V> static method
V
encode<V>(
- PaymentIntentCreateOptionsPaymentMethodOptionsUsBankAccount instance,
- Encoder<
V> encoder
Implementation
static V encode<V>(
PaymentIntentCreateOptionsPaymentMethodOptionsUsBankAccount instance,
Encoder<V> encoder,
) {
final container = encoder.container<String>();
if (instance.financialConnections != null) {
PaymentIntentFinancialConnections.encode(
instance.financialConnections!,
container.nestedSingleValueContainer('financial_connections').encoder,
);
}
if (instance.mandateOptions != null) {
PaymentIntentCreateOptionsPaymentMethodOptionsUsBankAccountMandateOptions
.encode(
instance.mandateOptions!,
container.nestedSingleValueContainer('mandate_options').encoder,
);
}
if (instance.networks != null) {
PaymentIntentNetworks.encode(
instance.networks!,
container.nestedSingleValueContainer('networks').encoder,
);
}
if (instance.preferredSettlementSpeed != null) {
container.encodeString(
'preferred_settlement_speed',
instance.preferredSettlementSpeed!,
);
}
if (instance.setupFutureUsage != null) {
PaymentIntentSetupFutureUsage.encode(
instance.setupFutureUsage!,
container.nestedSingleValueContainer('setup_future_usage').encoder,
);
}
if (instance.verificationMethod != null) {
CheckoutAcssDebitPaymentMethodOptionsVerificationMethod.encode(
instance.verificationMethod!,
container.nestedSingleValueContainer('verification_method').encoder,
);
}
return container.value;
}