encode<V> static method
Implementation
static V encode<V>(
SubscriptionPaymentSettingsPaymentMethodOptions instance,
Encoder<V> encoder,
) {
final container = encoder.container<String>();
if (instance.acssDebit != null) {
InvoicePaymentMethodOptionsAcssDebit.encode(
instance.acssDebit!,
container.nestedSingleValueContainer('acss_debit').encoder,
);
}
if (instance.bancontact != null) {
InvoicePaymentMethodOptionsBancontact.encode(
instance.bancontact!,
container.nestedSingleValueContainer('bancontact').encoder,
);
}
if (instance.card != null) {
SubscriptionPaymentSettingsPaymentMethodOptionsCard.encode(
instance.card!,
container.nestedSingleValueContainer('card').encoder,
);
}
if (instance.customerBalance != null) {
InvoicePaymentMethodOptionsCustomerBalance.encode(
instance.customerBalance!,
container.nestedSingleValueContainer('customer_balance').encoder,
);
}
if (instance.konbini != null) {
container.encodePrimitive(
'konbini',
instance.konbini!,
);
}
if (instance.sepaDebit != null) {
container.encodePrimitive(
'sepa_debit',
instance.sepaDebit!,
);
}
if (instance.usBankAccount != null) {
InvoicePaymentMethodOptionsUsBankAccount.encode(
instance.usBankAccount!,
container.nestedSingleValueContainer('us_bank_account').encoder,
);
}
return container.value;
}