ApplicationModel.fromJson constructor
ApplicationModel.fromJson(
- Map<String, dynamic> response
)
Implementation
factory ApplicationModel.fromJson(Map<String, dynamic> response) =>
ApplicationModel(
id: parseToInt(response, "id"),
myId: parseToString(response, "myIdApplicationId"),
hasMyId: response.containsKey("MyID") && response["MyID"] != null,
errorReason: parseToString(response, "reason_error"),
status: parseToString(response, "status"),
state: parseToString(response, "state"),
rejectionReason: parseToString(response, "reason_of_reject"),
hasOtp: parseToBool(response, "is_otp"),
serverStatus: parseToString(response, "b_status"),
serverState: parseToString(response, "b_state"),
otpType: parseToString(response, "otp_type"),
hasLimit: response.containsKey("limit_amount") &&
response["limit_amount"] != null &&
parseToString(response, "limit_amount").isNotEmpty
? true
: false,
);