PaymentMethodDetailsCardWallet.fromJson constructor

PaymentMethodDetailsCardWallet.fromJson(
  1. Object? json
)

Implementation

factory PaymentMethodDetailsCardWallet.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return PaymentMethodDetailsCardWallet(
    amexExpressCheckout: map['amex_express_checkout'] == null
        ? null
        : PaymentMethodDetailsCardWalletAmexExpressCheckout.fromJson(
            map['amex_express_checkout']),
    applePay: map['apple_pay'] == null
        ? null
        : PaymentMethodDetailsCardWalletApplePay.fromJson(map['apple_pay']),
    dynamicLast4: map['dynamic_last4'] == null
        ? null
        : (map['dynamic_last4'] as String),
    googlePay: map['google_pay'] == null
        ? null
        : PaymentMethodDetailsCardWalletGooglePay.fromJson(map['google_pay']),
    link: map['link'] == null
        ? null
        : PaymentMethodDetailsCardWalletLink.fromJson(map['link']),
    masterpass: map['masterpass'] == null
        ? null
        : PaymentMethodDetailsCardWalletMasterpass.fromJson(
            map['masterpass']),
    samsungPay: map['samsung_pay'] == null
        ? null
        : PaymentMethodDetailsCardWalletSamsungPay.fromJson(
            map['samsung_pay']),
    type: PaymentMethodCardWalletType.fromJson(map['type']),
    visaCheckout: map['visa_checkout'] == null
        ? null
        : PaymentMethodDetailsCardWalletVisaCheckout.fromJson(
            map['visa_checkout']),
  );
}