encode<V> static method
Implementation
static V encode<V>(
SetupIntentCreateOptionsPaymentMethodOptions instance,
Encoder<V> encoder,
) {
final container = encoder.container<String>();
if (instance.acssDebit != null) {
SetupIntentAcssDebit.encode(
instance.acssDebit!,
container.nestedSingleValueContainer('acss_debit').encoder,
);
}
if (instance.card != null) {
SetupIntentCard.encode(
instance.card!,
container.nestedSingleValueContainer('card').encoder,
);
}
if (instance.link != null) {
SetupIntentLink.encode(
instance.link!,
container.nestedSingleValueContainer('link').encoder,
);
}
if (instance.paypal != null) {
SetupIntentPaypal.encode(
instance.paypal!,
container.nestedSingleValueContainer('paypal').encoder,
);
}
if (instance.sepaDebit != null) {
SetupIntentSepaDebit.encode(
instance.sepaDebit!,
container.nestedSingleValueContainer('sepa_debit').encoder,
);
}
if (instance.usBankAccount != null) {
SetupIntentUsBankAccount.encode(
instance.usBankAccount!,
container.nestedSingleValueContainer('us_bank_account').encoder,
);
}
return container.value;
}