Authorization.fromJson constructor
Authorization.fromJson(
- Map<String, dynamic> json
)
Implementation
factory Authorization.fromJson(Map<String, dynamic> json) {
return Authorization(
authorizationCode: json['authorization_code']?.toString(),
bin: json['bin']?.toString(),
last4: json['last4']?.toString(),
expMonth: json['exp_month']?.toString(),
expYear: json['exp_year']?.toString(),
channel: json['channel']?.toString(),
cardType: json['card_type']?.toString(),
bank: json['bank']?.toString(),
countryCode: json['country_code']?.toString(),
brand: json['brand']?.toString(),
reusable: json['reusable'] is bool
? json['reusable']
: json['reusable']?.toString() == 'true',
signature: json['signature']?.toString(),
accountName: json['account_name']?.toString(),
mobileMoneyNumber: json['mobile_money_number']?.toString(),
);
}