encode<V> static method
Implementation
static V encode<V>(
PaymentIntentPaymentMethodOptions instance,
Encoder<V> encoder,
) {
final container = encoder.container<String>();
if (instance.acssDebit != null) {
PaymentIntentPaymentMethodOptionsAcssDebit.encode(
instance.acssDebit!,
container.nestedSingleValueContainer('acss_debit').encoder,
);
}
if (instance.affirm != null) {
PaymentMethodOptionsAffirm.encode(
instance.affirm!,
container.nestedSingleValueContainer('affirm').encoder,
);
}
if (instance.afterpayClearpay != null) {
PaymentMethodOptionsAfterpayClearpay.encode(
instance.afterpayClearpay!,
container.nestedSingleValueContainer('afterpay_clearpay').encoder,
);
}
if (instance.alipay != null) {
PaymentMethodOptionsAlipay.encode(
instance.alipay!,
container.nestedSingleValueContainer('alipay').encoder,
);
}
if (instance.auBecsDebit != null) {
PaymentIntentPaymentMethodOptionsAuBecsDebit.encode(
instance.auBecsDebit!,
container.nestedSingleValueContainer('au_becs_debit').encoder,
);
}
if (instance.bacsDebit != null) {
PaymentMethodOptionsBacsDebit.encode(
instance.bacsDebit!,
container.nestedSingleValueContainer('bacs_debit').encoder,
);
}
if (instance.bancontact != null) {
PaymentMethodOptionsBancontact.encode(
instance.bancontact!,
container.nestedSingleValueContainer('bancontact').encoder,
);
}
if (instance.blik != null) {
PaymentIntentPaymentMethodOptionsBlik.encode(
instance.blik!,
container.nestedSingleValueContainer('blik').encoder,
);
}
if (instance.boleto != null) {
PaymentMethodOptionsBoleto.encode(
instance.boleto!,
container.nestedSingleValueContainer('boleto').encoder,
);
}
if (instance.card != null) {
PaymentIntentPaymentMethodOptionsCard.encode(
instance.card!,
container.nestedSingleValueContainer('card').encoder,
);
}
if (instance.cardPresent != null) {
PaymentMethodOptionsCardPresent.encode(
instance.cardPresent!,
container.nestedSingleValueContainer('card_present').encoder,
);
}
if (instance.cashapp != null) {
PaymentMethodOptionsCashapp.encode(
instance.cashapp!,
container.nestedSingleValueContainer('cashapp').encoder,
);
}
if (instance.customerBalance != null) {
PaymentMethodOptionsCustomerBalance.encode(
instance.customerBalance!,
container.nestedSingleValueContainer('customer_balance').encoder,
);
}
if (instance.eps != null) {
PaymentIntentPaymentMethodOptionsEps.encode(
instance.eps!,
container.nestedSingleValueContainer('eps').encoder,
);
}
if (instance.fpx != null) {
PaymentMethodOptionsFpx.encode(
instance.fpx!,
container.nestedSingleValueContainer('fpx').encoder,
);
}
if (instance.giropay != null) {
PaymentMethodOptionsGiropay.encode(
instance.giropay!,
container.nestedSingleValueContainer('giropay').encoder,
);
}
if (instance.grabpay != null) {
PaymentMethodOptionsGrabpay.encode(
instance.grabpay!,
container.nestedSingleValueContainer('grabpay').encoder,
);
}
if (instance.ideal != null) {
PaymentMethodOptionsIdeal.encode(
instance.ideal!,
container.nestedSingleValueContainer('ideal').encoder,
);
}
if (instance.interacPresent != null) {
PaymentMethodOptionsInteracPresent.encode(
instance.interacPresent!,
container.nestedSingleValueContainer('interac_present').encoder,
);
}
if (instance.klarna != null) {
PaymentMethodOptionsKlarna.encode(
instance.klarna!,
container.nestedSingleValueContainer('klarna').encoder,
);
}
if (instance.konbini != null) {
PaymentMethodOptionsKonbini.encode(
instance.konbini!,
container.nestedSingleValueContainer('konbini').encoder,
);
}
if (instance.link != null) {
PaymentIntentPaymentMethodOptionsLink.encode(
instance.link!,
container.nestedSingleValueContainer('link').encoder,
);
}
if (instance.mobilepay != null) {
PaymentIntentPaymentMethodOptionsMobilepay.encode(
instance.mobilepay!,
container.nestedSingleValueContainer('mobilepay').encoder,
);
}
if (instance.oxxo != null) {
PaymentMethodOptionsOxxo.encode(
instance.oxxo!,
container.nestedSingleValueContainer('oxxo').encoder,
);
}
if (instance.p24 != null) {
PaymentMethodOptionsP24.encode(
instance.p24!,
container.nestedSingleValueContainer('p24').encoder,
);
}
if (instance.paynow != null) {
PaymentMethodOptionsPaynow.encode(
instance.paynow!,
container.nestedSingleValueContainer('paynow').encoder,
);
}
if (instance.paypal != null) {
PaymentMethodOptionsPaypal.encode(
instance.paypal!,
container.nestedSingleValueContainer('paypal').encoder,
);
}
if (instance.pix != null) {
PaymentMethodOptionsPix.encode(
instance.pix!,
container.nestedSingleValueContainer('pix').encoder,
);
}
if (instance.promptpay != null) {
PaymentMethodOptionsPromptpay.encode(
instance.promptpay!,
container.nestedSingleValueContainer('promptpay').encoder,
);
}
if (instance.revolutPay != null) {
PaymentMethodOptionsRevolutPay.encode(
instance.revolutPay!,
container.nestedSingleValueContainer('revolut_pay').encoder,
);
}
if (instance.sepaDebit != null) {
PaymentIntentPaymentMethodOptionsSepaDebit.encode(
instance.sepaDebit!,
container.nestedSingleValueContainer('sepa_debit').encoder,
);
}
if (instance.sofort != null) {
PaymentMethodOptionsSofort.encode(
instance.sofort!,
container.nestedSingleValueContainer('sofort').encoder,
);
}
if (instance.swish != null) {
PaymentIntentPaymentMethodOptionsSwish.encode(
instance.swish!,
container.nestedSingleValueContainer('swish').encoder,
);
}
if (instance.usBankAccount != null) {
PaymentIntentPaymentMethodOptionsUsBankAccount.encode(
instance.usBankAccount!,
container.nestedSingleValueContainer('us_bank_account').encoder,
);
}
if (instance.wechatPay != null) {
PaymentMethodOptionsWechatPay.encode(
instance.wechatPay!,
container.nestedSingleValueContainer('wechat_pay').encoder,
);
}
if (instance.zip != null) {
PaymentMethodOptionsZip.encode(
instance.zip!,
container.nestedSingleValueContainer('zip').encoder,
);
}
return container.value;
}