PaymentIntentCreateOptionsPaymentMethodOptions.fromJson constructor

PaymentIntentCreateOptionsPaymentMethodOptions.fromJson(
  1. Object? json
)

Implementation

factory PaymentIntentCreateOptionsPaymentMethodOptions.fromJson(
    Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return PaymentIntentCreateOptionsPaymentMethodOptions(
    acssDebit: map['acss_debit'] == null
        ? null
        : PaymentIntentCreateOptionsPaymentMethodOptionsAcssDebit.fromJson(
            map['acss_debit']),
    affirm: map['affirm'] == null
        ? null
        : PaymentIntentAffirm.fromJson(map['affirm']),
    afterpayClearpay: map['afterpay_clearpay'] == null
        ? null
        : PaymentIntentAfterpayClearpay.fromJson(map['afterpay_clearpay']),
    alipay: map['alipay'] == null
        ? null
        : PaymentIntentAlipay.fromJson(map['alipay']),
    auBecsDebit: map['au_becs_debit'] == null
        ? null
        : PaymentIntentCreateOptionsPaymentMethodOptionsAuBecsDebit.fromJson(
            map['au_becs_debit']),
    bacsDebit: map['bacs_debit'] == null
        ? null
        : PaymentIntentCreateOptionsPaymentMethodOptionsAuBecsDebit.fromJson(
            map['bacs_debit']),
    bancontact: map['bancontact'] == null
        ? null
        : PaymentIntentBancontact.fromJson(map['bancontact']),
    blik:
        map['blik'] == null ? null : PaymentIntentBlik.fromJson(map['blik']),
    boleto: map['boleto'] == null
        ? null
        : PaymentIntentBoleto.fromJson(map['boleto']),
    card:
        map['card'] == null ? null : PaymentIntentCard.fromJson(map['card']),
    cardPresent: map['card_present'] == null
        ? null
        : PaymentIntentCardPresent.fromJson(map['card_present']),
    cashapp: map['cashapp'] == null
        ? null
        : PaymentIntentCashapp.fromJson(map['cashapp']),
    customerBalance: map['customer_balance'] == null
        ? null
        : SessionCustomerBalance.fromJson(map['customer_balance']),
    eps: map['eps'] == null
        ? null
        : PaymentMethodOptionsZip.fromJson(map['eps']),
    fpx: map['fpx'] == null
        ? null
        : PaymentMethodOptionsZip.fromJson(map['fpx']),
    giropay: map['giropay'] == null
        ? null
        : PaymentMethodOptionsZip.fromJson(map['giropay']),
    grabpay: map['grabpay'] == null
        ? null
        : PaymentMethodOptionsZip.fromJson(map['grabpay']),
    ideal: map['ideal'] == null
        ? null
        : PaymentIntentAlipay.fromJson(map['ideal']),
    interacPresent: map['interac_present'] == null
        ? null
        : (map['interac_present'] as Object),
    klarna: map['klarna'] == null
        ? null
        : PaymentIntentCreateOptionsPaymentMethodOptionsKlarna.fromJson(
            map['klarna']),
    konbini: map['konbini'] == null
        ? null
        : PaymentIntentKonbini.fromJson(map['konbini']),
    link:
        map['link'] == null ? null : PaymentIntentLink.fromJson(map['link']),
    mobilepay: map['mobilepay'] == null
        ? null
        : PaymentIntentMobilepay.fromJson(map['mobilepay']),
    oxxo: map['oxxo'] == null ? null : SessionKonbini.fromJson(map['oxxo']),
    p24: map['p24'] == null ? null : SessionP24.fromJson(map['p24']),
    paynow: map['paynow'] == null
        ? null
        : PaymentMethodOptionsZip.fromJson(map['paynow']),
    paypal:
        map['paypal'] == null ? null : SessionPaypal.fromJson(map['paypal']),
    pix: map['pix'] == null ? null : PaymentIntentPix.fromJson(map['pix']),
    promptpay: map['promptpay'] == null
        ? null
        : PaymentMethodOptionsZip.fromJson(map['promptpay']),
    revolutPay: map['revolut_pay'] == null
        ? null
        : PaymentIntentAlipay.fromJson(map['revolut_pay']),
    sepaDebit: map['sepa_debit'] == null
        ? null
        : PaymentIntentCreateOptionsPaymentMethodOptionsSepaDebit.fromJson(
            map['sepa_debit']),
    sofort: map['sofort'] == null
        ? null
        : PaymentIntentCreateOptionsPaymentMethodOptionsSofort.fromJson(
            map['sofort']),
    swish: map['swish'] == null
        ? null
        : PaymentIntentSwish.fromJson(map['swish']),
    usBankAccount: map['us_bank_account'] == null
        ? null
        : PaymentIntentCreateOptionsPaymentMethodOptionsUsBankAccount
            .fromJson(map['us_bank_account']),
    wechatPay: map['wechat_pay'] == null
        ? null
        : SessionWechatPay.fromJson(map['wechat_pay']),
    zip: map['zip'] == null
        ? null
        : PaymentMethodOptionsZip.fromJson(map['zip']),
  );
}