|
|
|
@ -177,30 +177,39 @@ public class IDVerificationService {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private EventLogDetailed parseGetEventLogResponse(JSONObject jsonObject) throws Exception { |
|
|
|
|
String type = jsonObject.getJSONObject("data").getString("type"); |
|
|
|
|
String status = jsonObject.getJSONObject("data").getString("status"); |
|
|
|
|
String action = jsonObject.getJSONObject("data").getString("action"); |
|
|
|
|
String documentType = jsonObject.getJSONObject("data").getJSONObject("content").getString("document_type"); |
|
|
|
|
String documentNumber = jsonObject.getJSONObject("data").getJSONObject("content").getString("document_number"); |
|
|
|
|
String firstName = jsonObject.getJSONObject("data").getJSONObject("content").getString("first_name"); |
|
|
|
|
String lastName = jsonObject.getJSONObject("data").getJSONObject("content").getString("last_name"); |
|
|
|
|
String id = jsonObject.getJSONObject("data").getJSONObject("content").getString("id"); |
|
|
|
|
String confirmationNumber = jsonObject.getJSONObject("data").getJSONObject("content").getString("confirmation_number"); |
|
|
|
|
String profileOperaId = jsonObject.getJSONObject("data").getJSONObject("content").getString("profile_id_opera"); |
|
|
|
|
|
|
|
|
|
EventLogDetailed eventLogDetailed = new EventLogDetailed(); |
|
|
|
|
eventLogDetailed.setAction(action); |
|
|
|
|
eventLogDetailed.setType(type); |
|
|
|
|
eventLogDetailed.setStatus(status); |
|
|
|
|
eventLogDetailed.setDocumentType(documentType); |
|
|
|
|
eventLogDetailed.setDocumentNumber(documentNumber); |
|
|
|
|
eventLogDetailed.setFirstName(firstName); |
|
|
|
|
eventLogDetailed.setLastName(lastName); |
|
|
|
|
eventLogDetailed.setId(Integer.parseInt(id)); |
|
|
|
|
eventLogDetailed.setConfirmationNumber(confirmationNumber); |
|
|
|
|
eventLogDetailed.setProfileIdOpera(profileOperaId); |
|
|
|
|
|
|
|
|
|
return eventLogDetailed; |
|
|
|
|
if (jsonObject.has("data")) { |
|
|
|
|
try { |
|
|
|
|
String type = jsonObject.getJSONObject("data").getString("type"); |
|
|
|
|
String status = jsonObject.getJSONObject("data").getString("status"); |
|
|
|
|
String action = jsonObject.getJSONObject("data").getString("action"); |
|
|
|
|
String documentType = jsonObject.getJSONObject("data").getJSONObject("content").getString("document_type"); |
|
|
|
|
String documentNumber = jsonObject.getJSONObject("data").getJSONObject("content").getString("document_number"); |
|
|
|
|
String firstName = jsonObject.getJSONObject("data").getJSONObject("content").getString("first_name"); |
|
|
|
|
String lastName = jsonObject.getJSONObject("data").getJSONObject("content").getString("last_name"); |
|
|
|
|
String id = jsonObject.getJSONObject("data").getJSONObject("content").getString("id"); |
|
|
|
|
String confirmationNumber = jsonObject.getJSONObject("data").getJSONObject("content").getString("confirmation_number"); |
|
|
|
|
String profileOperaId = jsonObject.getJSONObject("data").getJSONObject("content").getString("profile_id_opera"); |
|
|
|
|
|
|
|
|
|
EventLogDetailed eventLogDetailed = new EventLogDetailed(); |
|
|
|
|
eventLogDetailed.setAction(action); |
|
|
|
|
eventLogDetailed.setType(type); |
|
|
|
|
eventLogDetailed.setStatus(status); |
|
|
|
|
eventLogDetailed.setDocumentType(documentType); |
|
|
|
|
eventLogDetailed.setDocumentNumber(documentNumber); |
|
|
|
|
eventLogDetailed.setFirstName(firstName); |
|
|
|
|
eventLogDetailed.setLastName(lastName); |
|
|
|
|
eventLogDetailed.setId(Integer.parseInt(id)); |
|
|
|
|
eventLogDetailed.setConfirmationNumber(confirmationNumber); |
|
|
|
|
eventLogDetailed.setProfileIdOpera(profileOperaId); |
|
|
|
|
|
|
|
|
|
return eventLogDetailed; |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
Logger.logE(e.getMessage()); |
|
|
|
|
e.printStackTrace(); |
|
|
|
|
return null; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return null; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|