SetupAttemptPaymentMethodDetailsCard.fromJson constructor

SetupAttemptPaymentMethodDetailsCard.fromJson(
  1. Object? json
)

Implementation

factory SetupAttemptPaymentMethodDetailsCard.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return SetupAttemptPaymentMethodDetailsCard(
    brand: map['brand'] == null ? null : (map['brand'] as String),
    checks: map['checks'] == null
        ? null
        : PaymentMethodDetailsCardChecks.fromJson(map['checks']),
    country: map['country'] == null ? null : (map['country'] as String),
    description:
        map['description'] == null ? null : (map['description'] as String),
    expMonth:
        map['exp_month'] == null ? null : (map['exp_month'] as num).toInt(),
    expYear:
        map['exp_year'] == null ? null : (map['exp_year'] as num).toInt(),
    fingerprint:
        map['fingerprint'] == null ? null : (map['fingerprint'] as String),
    funding: map['funding'] == null ? null : (map['funding'] as String),
    iin: map['iin'] == null ? null : (map['iin'] as String),
    issuer: map['issuer'] == null ? null : (map['issuer'] as String),
    last4: map['last4'] == null ? null : (map['last4'] as String),
    network: map['network'] == null ? null : (map['network'] as String),
    threeDSecure: map['three_d_secure'] == null
        ? null
        : SetupAttemptPaymentMethodDetailsCardThreeDSecure.fromJson(
            map['three_d_secure']),
    wallet: map['wallet'] == null
        ? null
        : SetupAttemptPaymentMethodDetailsCardWallet.fromJson(map['wallet']),
  );
}