IssuingAuthorizationCreateOptions.fromJson constructor
IssuingAuthorizationCreateOptions.fromJson(
- Object? json
Implementation
factory IssuingAuthorizationCreateOptions.fromJson(Object? json) {
final map = (json as Map).cast<String, Object?>();
return IssuingAuthorizationCreateOptions(
amount: (map['amount'] as num).toInt(),
amountDetails: map['amount_details'] == null
? null
: AuthorizationAmountDetails.fromJson(map['amount_details']),
authorizationMethod: map['authorization_method'] == null
? null
: IssuingAuthorizationAuthorizationMethod.fromJson(
map['authorization_method']),
card: (map['card'] as String),
currency: map['currency'] == null ? null : (map['currency'] as String),
expand: map['expand'] == null
? null
: (map['expand'] as List<Object?>)
.map((el) => (el as String))
.toList(),
isAmountControllable: map['is_amount_controllable'] == null
? null
: (map['is_amount_controllable'] as bool),
merchantData: map['merchant_data'] == null
? null
: AuthorizationMerchantData.fromJson(map['merchant_data']),
networkData: map['network_data'] == null
? null
: AuthorizationNetworkData.fromJson(map['network_data']),
verificationData: map['verification_data'] == null
? null
: AuthorizationVerificationData.fromJson(map['verification_data']),
wallet: map['wallet'] == null
? null
: IssuingTokenWalletProvider.fromJson(map['wallet']),
);
}