SavedCard.fromJson constructor
SavedCard.fromJson(
- dynamic data
Implementation
factory SavedCard.fromJson(dynamic data) {
var json = DynamicJsonExtension.getJsonMap(data);
return SavedCard(
id: json['id'],
brand: json['brand'],
last4: json['last_4'] ?? json['last4'],
expiryMonth: json['expiry_month'] ?? json['expiryMonth'],
expiryYear: json['expiry_year'] ?? json['expiryYear'],
country: json['country'],
logo: json['logo'],
bin: json['bin'],
requireCvv: json['require_cvv'] ?? json['requireCvv'],
cvvConfig: (json['require_cvv'] ?? json['requireCvv']) != null
? CvvConfig.fromJson(
(json['cvv_config'] ?? json["cvvConfig"]) as Map<String, dynamic>)
: null,
type: methodTypeFromJson(json['type']),
);
}