IBinoxusRequestResponse.fromJson constructor

IBinoxusRequestResponse.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory IBinoxusRequestResponse.fromJson(Map<String, dynamic> json) {
  return IBinoxusRequestResponse(
    binStatus: json.containsKey('bin_status') && json['bin_status'] is String
        ? EApiResponseStatusCode.fromString(json['bin_status'])
        : EApiResponseStatusCode.bIN001,
    message: json.containsKey('message') ? json['message'] : "-",
    paymentInfo: json.containsKey('payment_info')
        ? IBinoxusPaymentResponse.fromJson(json['payment_info'])
        : IBinoxusPaymentResponse.empty(),
  );
}