CardTokenData.fromJson constructor

CardTokenData.fromJson(
  1. dynamic data
)

Implementation

factory CardTokenData.fromJson(dynamic data) {
  var json = DynamicJsonExtension.getJsonMap(data);

  return CardTokenData(
    bin: json['bin'],
    brand: json['brand'],
    cardHolderName: json['card_holder_name'],
    country: json['country'],
    expiryMonth: json['expiry_month'],
    expiryYear: json['expiry_year'],
    issuer: json['issuer'],
    last4: json['last_4'],
    logo: json['logo'],
    paymentMethods: (json['payment_methods'] as List<dynamic>?)
        ?.map((e) => e as String)
        .toList(),
    requiresCvv: json['requires_cvv'],
  );
}