PaywayCheckTransactionResponse.fromMap constructor
PaywayCheckTransactionResponse.fromMap(
- Map<String, dynamic> map
)
Implementation
factory PaywayCheckTransactionResponse.fromMap(Map<String, dynamic> map) {
return PaywayCheckTransactionResponse(
status: map['status']?.toInt() ?? -1,
description: map['description'] ?? '',
amount: map['amount']?.toDouble() ?? 0.0,
totalAmount: map['total_amount']?.toDouble(),
apv: map['apv'] ?? '',
paymentStatus: map['payment_status'] ?? '',
datetime: map['datetime'] == null ? null : DateTime.tryParse(map['datetime']),
originalCurrency: $ABATransactionCurrencyMap[map['original_currency']],
payout: map['payout'] != null
? List<Map<dynamic, dynamic>>.from(map['payout'])
: null,
tranId: map['tran_id'],
firstname: map['firstname'],
lastname: map['lastname'],
phone: map['phone'],
email: map['email'],
paymentType: map['payment_type'],
);
}