LokotroPayError.fromJson constructor
LokotroPayError.fromJson(
- Map<String, dynamic> json
)
Implementation
factory LokotroPayError.fromJson(Map<String, dynamic> json) {
return LokotroPayError(
message: json['message'] ?? 'An error occurred',
title: json['title'] ?? 'Error',
errorCode: json['error_code'] != null
? parseApiResponseCode(json['error_code'])
: null,
details: json['details'],
successRedirectUrl: json['success_redirect_url'],
failRedirectUrl: json['fail_redirect_url'],
timestamp: json['timestamp'] != null
? DateTime.tryParse(json['timestamp'])
: null,
);
}