AvailablePaymentMethod.fromJson constructor
AvailablePaymentMethod.fromJson(
- Map<String, dynamic> json
)
Implementation
factory AvailablePaymentMethod.fromJson(Map<String, dynamic> json) {
return AvailablePaymentMethod(
type: json['type']?.toString() ?? '',
sequence: _asInt(json['sequence']),
show: _asTruthyInt(json['show']),
schemes: _stringList(json['schemes']),
psp: json['psp']?.toString() ?? '',
identifier: json['identifier']?.toString() ?? '',
merchantId: json['merchant_id']?.toString() ?? '',
gatewayMerchantId: json['gateway_merchant_id']?.toString() ?? '',
publicKey: json['public_key']?.toString() ?? '',
merchantCode: json['merchant_code']?.toString() ?? '',
banks: _objectList(json['banks'])
.map(CheckoutBank.fromJson)
.toList(growable: false),
upiAppsSupported: _objectList(json['upi_apps_supported'])
.map(CheckoutUpiApp.fromJson)
.toList(growable: false),
);
}