CheckoutSessionPaymentMethodOptions.fromJson constructor

CheckoutSessionPaymentMethodOptions.fromJson(
  1. Object? json
)

Implementation

factory CheckoutSessionPaymentMethodOptions.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return CheckoutSessionPaymentMethodOptions(
    acssDebit: map['acss_debit'] == null
        ? null
        : CheckoutAcssDebitPaymentMethodOptions.fromJson(map['acss_debit']),
    affirm: map['affirm'] == null
        ? null
        : CheckoutAffirmPaymentMethodOptions.fromJson(map['affirm']),
    afterpayClearpay: map['afterpay_clearpay'] == null
        ? null
        : CheckoutAfterpayClearpayPaymentMethodOptions.fromJson(
            map['afterpay_clearpay']),
    alipay: map['alipay'] == null
        ? null
        : CheckoutAlipayPaymentMethodOptions.fromJson(map['alipay']),
    auBecsDebit: map['au_becs_debit'] == null
        ? null
        : CheckoutAuBecsDebitPaymentMethodOptions.fromJson(
            map['au_becs_debit']),
    bacsDebit: map['bacs_debit'] == null
        ? null
        : CheckoutBacsDebitPaymentMethodOptions.fromJson(map['bacs_debit']),
    bancontact: map['bancontact'] == null
        ? null
        : CheckoutBancontactPaymentMethodOptions.fromJson(map['bancontact']),
    boleto: map['boleto'] == null
        ? null
        : CheckoutBoletoPaymentMethodOptions.fromJson(map['boleto']),
    card: map['card'] == null
        ? null
        : CheckoutCardPaymentMethodOptions.fromJson(map['card']),
    cashapp: map['cashapp'] == null
        ? null
        : CheckoutCashappPaymentMethodOptions.fromJson(map['cashapp']),
    customerBalance: map['customer_balance'] == null
        ? null
        : CheckoutCustomerBalancePaymentMethodOptions.fromJson(
            map['customer_balance']),
    eps: map['eps'] == null
        ? null
        : CheckoutEpsPaymentMethodOptions.fromJson(map['eps']),
    fpx: map['fpx'] == null
        ? null
        : CheckoutFpxPaymentMethodOptions.fromJson(map['fpx']),
    giropay: map['giropay'] == null
        ? null
        : CheckoutGiropayPaymentMethodOptions.fromJson(map['giropay']),
    grabpay: map['grabpay'] == null
        ? null
        : CheckoutGrabPayPaymentMethodOptions.fromJson(map['grabpay']),
    ideal: map['ideal'] == null
        ? null
        : CheckoutIdealPaymentMethodOptions.fromJson(map['ideal']),
    klarna: map['klarna'] == null
        ? null
        : CheckoutKlarnaPaymentMethodOptions.fromJson(map['klarna']),
    konbini: map['konbini'] == null
        ? null
        : CheckoutKonbiniPaymentMethodOptions.fromJson(map['konbini']),
    link: map['link'] == null
        ? null
        : CheckoutLinkPaymentMethodOptions.fromJson(map['link']),
    oxxo: map['oxxo'] == null
        ? null
        : CheckoutOxxoPaymentMethodOptions.fromJson(map['oxxo']),
    p24: map['p24'] == null
        ? null
        : CheckoutP24PaymentMethodOptions.fromJson(map['p24']),
    paynow: map['paynow'] == null
        ? null
        : CheckoutPaynowPaymentMethodOptions.fromJson(map['paynow']),
    paypal: map['paypal'] == null
        ? null
        : CheckoutPaypalPaymentMethodOptions.fromJson(map['paypal']),
    pix: map['pix'] == null
        ? null
        : CheckoutPixPaymentMethodOptions.fromJson(map['pix']),
    revolutPay: map['revolut_pay'] == null
        ? null
        : CheckoutRevolutPayPaymentMethodOptions.fromJson(map['revolut_pay']),
    sepaDebit: map['sepa_debit'] == null
        ? null
        : CheckoutSepaDebitPaymentMethodOptions.fromJson(map['sepa_debit']),
    sofort: map['sofort'] == null
        ? null
        : CheckoutSofortPaymentMethodOptions.fromJson(map['sofort']),
    swish: map['swish'] == null
        ? null
        : CheckoutSwishPaymentMethodOptions.fromJson(map['swish']),
    usBankAccount: map['us_bank_account'] == null
        ? null
        : CheckoutUsBankAccountPaymentMethodOptions.fromJson(
            map['us_bank_account']),
  );
}