Skip to content

Commit

Permalink
SDK-2372: Add RequirementsNotMetDetailsResponse to IdentityProfileFai…
Browse files Browse the repository at this point in the history
…lureResponse
  • Loading branch information
MrBurtyyy committed Dec 8, 2023
1 parent a15beab commit a77385a
Show file tree
Hide file tree
Showing 3 changed files with 80 additions and 0 deletions.
31 changes: 31 additions & 0 deletions examples/doc-scan/src/main/resources/templates/success.html
Original file line number Diff line number Diff line change
Expand Up @@ -924,6 +924,37 @@ <h2>Import Token</h2>
</div>
</th:block>

<th:block th:if="${sessionResult.getIdentityProfile() != null}">
<div class="row pt-4">
<div class="col">
<h2>Identity Profile</h2>
</div>
</div>

<!-- Identity Profile Failure Reason -->
<th:block th:if="${sessionResult.getIdentityProfile().getFailureReason() != null}">
<div class="row pt-4">
<div class="col">
<div class="accordion mt-3">
<div class="card" th:if="${sessionResult.getIdentityProfile().getFailureReason() != null}">
Failure Reason: <span th:text="${sessionResult.getIdentityProfile().getFailureReason().getReasonCode()}"></span>
<th:block th:if="${sessionResult.getIdentityProfile().getFailureReason().getRequirementNotMetDetails() != null}">
<th:block th:with="requirementsNotMetDetails=${sessionResult.getIdentityProfile().getFailureReason().getRequirementNotMetDetails()}">
<span th:if="${requirementsNotMetDetails.getFailureType() != null}">Failure Type: <span th:text="${requirementsNotMetDetails.getFailureType()}"></span></span>
<span th:if="${requirementsNotMetDetails.getDocumentType() != null}">Document Type: <span th:text="${requirementsNotMetDetails.getDocumentType()}"></span></span>
<span th:if="${requirementsNotMetDetails.getDocumentCountryIsoCode() != null}">Document Country ISO Code: <span th:text="${requirementsNotMetDetails.getDocumentCountryIsoCode()}"></span></span>
<span th:if="${requirementsNotMetDetails.getAuditId() != null}">Audit ID: <span th:text="${requirementsNotMetDetails.getAuditId()}"></span></span>
<span th:if="${requirementsNotMetDetails.getDetails() != null}">Details: <span th:text="${requirementsNotMetDetails.getDetails()}"></span></span>
</th:block>
</th:block>
</div>
</div>
</div>
</div>
</th:block>

</th:block>

</div>

<div th:replace="fragments/components :: footer"></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,15 @@ public class IdentityProfileFailureResponse {
@JsonProperty("reason_code")
private String reasonCode;

@JsonProperty("requirement_not_met_details")
private RequirementNotMetDetailsResponse requirementNotMetDetails;

public String getReasonCode() {
return reasonCode;
}

public RequirementNotMetDetailsResponse getRequirementNotMetDetails() {
return requirementNotMetDetails;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
package com.yoti.api.client.docs.session.retrieve;

import com.fasterxml.jackson.annotation.JsonProperty;

public class RequirementNotMetDetailsResponse {

@JsonProperty("failure_type")
private String failureType;

@JsonProperty("document_type")
private String documentType;

@JsonProperty("document_country_iso_code")
private String documentCountryIsoCode;

@JsonProperty("audit_id")
private String auditId;

@JsonProperty("details")
private String details;

public String getFailureType() {
return failureType;
}

public String getDocumentType() {
return documentType;
}

public String getDocumentCountryIsoCode() {
return documentCountryIsoCode;
}

public String getAuditId() {
return auditId;
}

public String getDetails() {
return details;
}

}

0 comments on commit a77385a

Please sign in to comment.