PaymentMethodConfiguration.fromJson constructor

PaymentMethodConfiguration.fromJson(
  1. Object? json
)

Implementation

factory PaymentMethodConfiguration.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return PaymentMethodConfiguration(
    acssDebit: map['acss_debit'] == null
        ? null
        : PaymentMethodConfigResourcePaymentMethodProperties.fromJson(
            map['acss_debit']),
    active: (map['active'] as bool),
    affirm: map['affirm'] == null
        ? null
        : PaymentMethodConfigResourcePaymentMethodProperties.fromJson(
            map['affirm']),
    afterpayClearpay: map['afterpay_clearpay'] == null
        ? null
        : PaymentMethodConfigResourcePaymentMethodProperties.fromJson(
            map['afterpay_clearpay']),
    alipay: map['alipay'] == null
        ? null
        : PaymentMethodConfigResourcePaymentMethodProperties.fromJson(
            map['alipay']),
    applePay: map['apple_pay'] == null
        ? null
        : PaymentMethodConfigResourcePaymentMethodProperties.fromJson(
            map['apple_pay']),
    application:
        map['application'] == null ? null : (map['application'] as String),
    auBecsDebit: map['au_becs_debit'] == null
        ? null
        : PaymentMethodConfigResourcePaymentMethodProperties.fromJson(
            map['au_becs_debit']),
    bacsDebit: map['bacs_debit'] == null
        ? null
        : PaymentMethodConfigResourcePaymentMethodProperties.fromJson(
            map['bacs_debit']),
    bancontact: map['bancontact'] == null
        ? null
        : PaymentMethodConfigResourcePaymentMethodProperties.fromJson(
            map['bancontact']),
    blik: map['blik'] == null
        ? null
        : PaymentMethodConfigResourcePaymentMethodProperties.fromJson(
            map['blik']),
    boleto: map['boleto'] == null
        ? null
        : PaymentMethodConfigResourcePaymentMethodProperties.fromJson(
            map['boleto']),
    card: map['card'] == null
        ? null
        : PaymentMethodConfigResourcePaymentMethodProperties.fromJson(
            map['card']),
    cartesBancaires: map['cartes_bancaires'] == null
        ? null
        : PaymentMethodConfigResourcePaymentMethodProperties.fromJson(
            map['cartes_bancaires']),
    cashapp: map['cashapp'] == null
        ? null
        : PaymentMethodConfigResourcePaymentMethodProperties.fromJson(
            map['cashapp']),
    customerBalance: map['customer_balance'] == null
        ? null
        : PaymentMethodConfigResourcePaymentMethodProperties.fromJson(
            map['customer_balance']),
    eps: map['eps'] == null
        ? null
        : PaymentMethodConfigResourcePaymentMethodProperties.fromJson(
            map['eps']),
    fpx: map['fpx'] == null
        ? null
        : PaymentMethodConfigResourcePaymentMethodProperties.fromJson(
            map['fpx']),
    giropay: map['giropay'] == null
        ? null
        : PaymentMethodConfigResourcePaymentMethodProperties.fromJson(
            map['giropay']),
    googlePay: map['google_pay'] == null
        ? null
        : PaymentMethodConfigResourcePaymentMethodProperties.fromJson(
            map['google_pay']),
    grabpay: map['grabpay'] == null
        ? null
        : PaymentMethodConfigResourcePaymentMethodProperties.fromJson(
            map['grabpay']),
    id: (map['id'] as String),
    ideal: map['ideal'] == null
        ? null
        : PaymentMethodConfigResourcePaymentMethodProperties.fromJson(
            map['ideal']),
    isDefault: (map['is_default'] as bool),
    jcb: map['jcb'] == null
        ? null
        : PaymentMethodConfigResourcePaymentMethodProperties.fromJson(
            map['jcb']),
    klarna: map['klarna'] == null
        ? null
        : PaymentMethodConfigResourcePaymentMethodProperties.fromJson(
            map['klarna']),
    konbini: map['konbini'] == null
        ? null
        : PaymentMethodConfigResourcePaymentMethodProperties.fromJson(
            map['konbini']),
    link: map['link'] == null
        ? null
        : PaymentMethodConfigResourcePaymentMethodProperties.fromJson(
            map['link']),
    livemode: (map['livemode'] as bool),
    name: (map['name'] as String),
    oxxo: map['oxxo'] == null
        ? null
        : PaymentMethodConfigResourcePaymentMethodProperties.fromJson(
            map['oxxo']),
    p24: map['p24'] == null
        ? null
        : PaymentMethodConfigResourcePaymentMethodProperties.fromJson(
            map['p24']),
    parent: map['parent'] == null ? null : (map['parent'] as String),
    paynow: map['paynow'] == null
        ? null
        : PaymentMethodConfigResourcePaymentMethodProperties.fromJson(
            map['paynow']),
    paypal: map['paypal'] == null
        ? null
        : PaymentMethodConfigResourcePaymentMethodProperties.fromJson(
            map['paypal']),
    promptpay: map['promptpay'] == null
        ? null
        : PaymentMethodConfigResourcePaymentMethodProperties.fromJson(
            map['promptpay']),
    revolutPay: map['revolut_pay'] == null
        ? null
        : PaymentMethodConfigResourcePaymentMethodProperties.fromJson(
            map['revolut_pay']),
    sepaDebit: map['sepa_debit'] == null
        ? null
        : PaymentMethodConfigResourcePaymentMethodProperties.fromJson(
            map['sepa_debit']),
    sofort: map['sofort'] == null
        ? null
        : PaymentMethodConfigResourcePaymentMethodProperties.fromJson(
            map['sofort']),
    usBankAccount: map['us_bank_account'] == null
        ? null
        : PaymentMethodConfigResourcePaymentMethodProperties.fromJson(
            map['us_bank_account']),
    wechatPay: map['wechat_pay'] == null
        ? null
        : PaymentMethodConfigResourcePaymentMethodProperties.fromJson(
            map['wechat_pay']),
  );
}