PaymentResponseBody.fromJson constructor
PaymentResponseBody.fromJson(
- Map<String, dynamic> json
)
Implementation
factory PaymentResponseBody.fromJson(Map<String, dynamic> json) =>
PaymentResponseBody(
id: json['id'] as String,
reference: json['reference'] as String,
spotflowReference: json['spotflowReference'] as String,
amount: json['amount'] as num,
currency: json['currency'] as String,
channel: json['channel'] as String,
status: json['status'] as String,
customer:
CustomerInfo.fromJson(json['customer'] as Map<String, dynamic>),
provider: json['provider'] as String,
rate: json['rate'],
authorization: json['authorization'] != null
? Authorization.fromJson(
json['authorization'] as Map<String, dynamic>)
: null,
bankDetails: json['bankDetails'] != null
? BankDetails.fromJson(json['bankDetails'] as Map<String, dynamic>)
: null,
ussd: json['ussd'] != null ? UssdResponse.fromJson(json['ussd']) : null,
providerMessage: json['providerMessage'],
);