TokenCardCreditCardSpecs.fromJson constructor

TokenCardCreditCardSpecs.fromJson(
  1. Object? json
)

Implementation

factory TokenCardCreditCardSpecs.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return TokenCardCreditCardSpecs(
    addressCity:
        map['address_city'] == null ? null : (map['address_city'] as String),
    addressCountry: map['address_country'] == null
        ? null
        : (map['address_country'] as String),
    addressLine1: map['address_line1'] == null
        ? null
        : (map['address_line1'] as String),
    addressLine2: map['address_line2'] == null
        ? null
        : (map['address_line2'] as String),
    addressState: map['address_state'] == null
        ? null
        : (map['address_state'] as String),
    addressZip:
        map['address_zip'] == null ? null : (map['address_zip'] as String),
    currency: map['currency'] == null ? null : (map['currency'] as String),
    cvc: map['cvc'] == null ? null : (map['cvc'] as String),
    expMonth: (map['exp_month'] as String),
    expYear: (map['exp_year'] as String),
    name: map['name'] == null ? null : (map['name'] as String),
    networks: map['networks'] == null
        ? null
        : PaymentMethodNetworks.fromJson(map['networks']),
    number: (map['number'] as String),
  );
}