PaymentResponse.fromMap constructor
PaymentResponse.fromMap(
- Map<String, dynamic> map
)
Implementation
factory PaymentResponse.fromMap(Map<String, dynamic> map) {
return PaymentResponse(
id: map['id'] ?? '',
actionId: map['actionId'] ?? '',
amount: map['amount']?.toInt() ?? 0,
approved: map['approved'] ?? false,
status: map['status'] ?? '',
responseCode: map['responseCode'] ?? '',
token: map['token'] ?? '',
reference: map['reference'] ?? '',
description: map['description'] ?? '',
customer: Customer.fromMap(map['customer']),
currency: map['currency'] ?? '',
processedOn: map['processedOn'] ?? '',
);
}