PaymentMethodCardWallet.fromJson constructor

PaymentMethodCardWallet.fromJson(
  1. Object? json
)

Implementation

factory PaymentMethodCardWallet.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return PaymentMethodCardWallet(
    amexExpressCheckout: map['amex_express_checkout'] == null
        ? null
        : PaymentMethodCardWalletAmexExpressCheckout.fromJson(
            map['amex_express_checkout']),
    applePay: map['apple_pay'] == null
        ? null
        : PaymentMethodCardWalletApplePay.fromJson(map['apple_pay']),
    dynamicLast4: map['dynamic_last4'] == null
        ? null
        : (map['dynamic_last4'] as String),
    googlePay: map['google_pay'] == null
        ? null
        : PaymentMethodCardWalletGooglePay.fromJson(map['google_pay']),
    link: map['link'] == null
        ? null
        : PaymentMethodCardWalletLink.fromJson(map['link']),
    masterpass: map['masterpass'] == null
        ? null
        : PaymentMethodCardWalletMasterpass.fromJson(map['masterpass']),
    samsungPay: map['samsung_pay'] == null
        ? null
        : PaymentMethodCardWalletSamsungPay.fromJson(map['samsung_pay']),
    type: PaymentMethodCardWalletType.fromJson(map['type']),
    visaCheckout: map['visa_checkout'] == null
        ? null
        : PaymentMethodCardWalletVisaCheckout.fromJson(map['visa_checkout']),
  );
}