AuropayResponse.fromJson constructor
AuropayResponse.fromJson(
- Map json
Implementation
factory AuropayResponse.fromJson(Map<dynamic, dynamic> json) {
return json['type'] == 'success'
? (json['data'] as Map<dynamic, dynamic>).containsKey('referenceNo')
? AuropayResponse(
type: ResponseType.success,
data: SuccessDetail.fromJson(json['data']))
: AuropayResponse(
type: ResponseType.success,
data: SuccessData.fromJson(json['data']))
: AuropayResponse(
type: ResponseType.failed,
data: FailureData.fromJson(json['data']));
}