PaymentMethodDetails.fromJson constructor

PaymentMethodDetails.fromJson(
  1. Object? json
)

Implementation

factory PaymentMethodDetails.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return PaymentMethodDetails(
    achCreditTransfer: map['ach_credit_transfer'] == null
        ? null
        : PaymentMethodDetailsAchCreditTransfer.fromJson(
            map['ach_credit_transfer']),
    achDebit: map['ach_debit'] == null
        ? null
        : PaymentMethodDetailsAchDebit.fromJson(map['ach_debit']),
    acssDebit: map['acss_debit'] == null
        ? null
        : PaymentMethodDetailsAcssDebit.fromJson(map['acss_debit']),
    affirm: map['affirm'] == null
        ? null
        : PaymentMethodDetailsAffirm.fromJson(map['affirm']),
    afterpayClearpay: map['afterpay_clearpay'] == null
        ? null
        : PaymentMethodDetailsAfterpayClearpay.fromJson(
            map['afterpay_clearpay']),
    alipay: map['alipay'] == null
        ? null
        : PaymentFlowsPrivatePaymentMethodsAlipayDetails.fromJson(
            map['alipay']),
    auBecsDebit: map['au_becs_debit'] == null
        ? null
        : PaymentMethodDetailsAuBecsDebit.fromJson(map['au_becs_debit']),
    bacsDebit: map['bacs_debit'] == null
        ? null
        : PaymentMethodDetailsBacsDebit.fromJson(map['bacs_debit']),
    bancontact: map['bancontact'] == null
        ? null
        : PaymentMethodDetailsBancontact.fromJson(map['bancontact']),
    blik: map['blik'] == null
        ? null
        : PaymentMethodDetailsBlik.fromJson(map['blik']),
    boleto: map['boleto'] == null
        ? null
        : PaymentMethodDetailsBoleto.fromJson(map['boleto']),
    card: map['card'] == null
        ? null
        : PaymentMethodDetailsCard.fromJson(map['card']),
    cardPresent: map['card_present'] == null
        ? null
        : PaymentMethodDetailsCardPresent.fromJson(map['card_present']),
    cashapp: map['cashapp'] == null
        ? null
        : PaymentMethodDetailsCashapp.fromJson(map['cashapp']),
    customerBalance: map['customer_balance'] == null
        ? null
        : PaymentMethodDetailsCustomerBalance.fromJson(
            map['customer_balance']),
    eps: map['eps'] == null
        ? null
        : PaymentMethodDetailsEps.fromJson(map['eps']),
    fpx: map['fpx'] == null
        ? null
        : PaymentMethodDetailsFpx.fromJson(map['fpx']),
    giropay: map['giropay'] == null
        ? null
        : PaymentMethodDetailsGiropay.fromJson(map['giropay']),
    grabpay: map['grabpay'] == null
        ? null
        : PaymentMethodDetailsGrabpay.fromJson(map['grabpay']),
    ideal: map['ideal'] == null
        ? null
        : PaymentMethodDetailsIdeal.fromJson(map['ideal']),
    interacPresent: map['interac_present'] == null
        ? null
        : PaymentMethodDetailsInteracPresent.fromJson(map['interac_present']),
    klarna: map['klarna'] == null
        ? null
        : PaymentMethodDetailsKlarna.fromJson(map['klarna']),
    konbini: map['konbini'] == null
        ? null
        : PaymentMethodDetailsKonbini.fromJson(map['konbini']),
    link: map['link'] == null
        ? null
        : PaymentMethodDetailsLink.fromJson(map['link']),
    mobilepay: map['mobilepay'] == null
        ? null
        : PaymentMethodDetailsMobilepay.fromJson(map['mobilepay']),
    multibanco: map['multibanco'] == null
        ? null
        : PaymentMethodDetailsMultibanco.fromJson(map['multibanco']),
    oxxo: map['oxxo'] == null
        ? null
        : PaymentMethodDetailsOxxo.fromJson(map['oxxo']),
    p24: map['p24'] == null
        ? null
        : PaymentMethodDetailsP24.fromJson(map['p24']),
    paynow: map['paynow'] == null
        ? null
        : PaymentMethodDetailsPaynow.fromJson(map['paynow']),
    paypal: map['paypal'] == null
        ? null
        : PaymentMethodDetailsPaypal.fromJson(map['paypal']),
    pix: map['pix'] == null
        ? null
        : PaymentMethodDetailsPix.fromJson(map['pix']),
    promptpay: map['promptpay'] == null
        ? null
        : PaymentMethodDetailsPromptpay.fromJson(map['promptpay']),
    revolutPay: map['revolut_pay'] == null
        ? null
        : PaymentMethodDetailsRevolutPay.fromJson(map['revolut_pay']),
    sepaCreditTransfer: map['sepa_credit_transfer'] == null
        ? null
        : PaymentMethodDetailsSepaCreditTransfer.fromJson(
            map['sepa_credit_transfer']),
    sepaDebit: map['sepa_debit'] == null
        ? null
        : PaymentMethodDetailsSepaDebit.fromJson(map['sepa_debit']),
    sofort: map['sofort'] == null
        ? null
        : PaymentMethodDetailsSofort.fromJson(map['sofort']),
    stripeAccount: map['stripe_account'] == null
        ? null
        : PaymentMethodDetailsStripeAccount.fromJson(map['stripe_account']),
    swish: map['swish'] == null
        ? null
        : PaymentMethodDetailsSwish.fromJson(map['swish']),
    type: (map['type'] as String),
    usBankAccount: map['us_bank_account'] == null
        ? null
        : PaymentMethodDetailsUsBankAccount.fromJson(map['us_bank_account']),
    wechat: map['wechat'] == null
        ? null
        : PaymentMethodDetailsWechat.fromJson(map['wechat']),
    wechatPay: map['wechat_pay'] == null
        ? null
        : PaymentMethodDetailsWechatPay.fromJson(map['wechat_pay']),
    zip: map['zip'] == null
        ? null
        : PaymentMethodDetailsZip.fromJson(map['zip']),
  );
}