diff --git a/.release.json b/.release.json index 44466cc..57e5bc6 100644 --- a/.release.json +++ b/.release.json @@ -1,9 +1,9 @@ { "source": { "repo_url": "https://github.com/onfido/onfido-openapi-spec", - "short_sha": "c80d3b5", - "long_sha": "c80d3b513a15bb67ec316709884b890ab2f47121", - "version": "v5.5.0" + "short_sha": "dbd43ed", + "long_sha": "dbd43ed035dc8ddaf611883e77370114f21534e5", + "version": "v5.6.0" }, - "release": "v6.5.0" + "release": "v6.6.0" } diff --git a/README.md b/README.md index 69947b4..0c8ecbc 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ Add this dependency to your project's POM: com.onfido onfido-api-java - 6.5.0 + 6.6.0 compile ``` @@ -66,7 +66,7 @@ Add this dependency to your project's build file: } dependencies { - implementation "com.onfido:onfido-api-java:6.5.0" + implementation "com.onfido:onfido-api-java:6.6.0" } ``` @@ -80,10 +80,10 @@ mvn clean package Then manually install the following JARs: -- `target/onfido-api-java-6.5.0.jar` +- `target/onfido-api-java-6.6.0.jar` - `target/lib/*.jar` -The latest version can be found at . +The latest version can be found at . ## Getting Started diff --git a/build.gradle b/build.gradle index 914fb11..f958251 100644 --- a/build.gradle +++ b/build.gradle @@ -4,7 +4,7 @@ apply plugin: 'java' apply plugin: 'com.diffplug.spotless' group = 'com.onfido' -version = '6.5.0' +version = '6.6.0' buildscript { repositories { diff --git a/build.sbt b/build.sbt index 0d3ba39..1195943 100644 --- a/build.sbt +++ b/build.sbt @@ -2,7 +2,7 @@ lazy val root = (project in file(".")). settings( organization := "com.onfido", name := "onfido-api-java", - version := "6.5.0", + version := "6.6.0", scalaVersion := "2.11.4", scalacOptions ++= Seq("-feature"), javacOptions in compile ++= Seq("-Xlint:deprecation"), diff --git a/pom.xml b/pom.xml index 2273c21..2a12b1e 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ onfido-api-java jar onfido-api-java - 6.5.0 + 6.6.0 https://documentation.onfido.com Official Java API client library for the Onfido API diff --git a/src/main/java/com/onfido/ApiClient.java b/src/main/java/com/onfido/ApiClient.java index 874f291..d17c5d1 100644 --- a/src/main/java/com/onfido/ApiClient.java +++ b/src/main/java/com/onfido/ApiClient.java @@ -162,7 +162,7 @@ private void init() { json = new JSON(); // Set default User-Agent. - setUserAgent("onfido-java/6.5.0"); + setUserAgent("onfido-java/6.6.0"); authentications = new HashMap(); } diff --git a/src/main/java/com/onfido/Configuration.java b/src/main/java/com/onfido/Configuration.java index e452c6f..0005de1 100644 --- a/src/main/java/com/onfido/Configuration.java +++ b/src/main/java/com/onfido/Configuration.java @@ -15,7 +15,7 @@ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") public class Configuration { - public static final String VERSION = "6.5.0"; + public static final String VERSION = "6.6.0"; private static ApiClient defaultApiClient = new ApiClient(); diff --git a/src/main/java/com/onfido/api/DefaultApi.java b/src/main/java/com/onfido/api/DefaultApi.java index f89eb24..677db6c 100644 --- a/src/main/java/com/onfido/api/DefaultApi.java +++ b/src/main/java/com/onfido/api/DefaultApi.java @@ -7586,6 +7586,7 @@ public okhttp3.Call listWebhooksAsync(final ApiCallback _callback) * @param createdAtLt A ISO-8601 date to filter results with a created date less than (before) the one provided. (optional) * @param sort A string with the value 'desc' or 'asc' that allows to sort the returned list by the completed datetime either descending or ascending, respectively. If not specified, defaults to 'desc'. (optional, default to desc) * @param applicantId the applicant's id. (optional) + * @param tags A list of tags to filter the results. (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -7597,7 +7598,7 @@ public okhttp3.Call listWebhooksAsync(final ApiCallback _callback) 0 Unexpected error - */ - public okhttp3.Call listWorkflowRunsCall(Integer page, String status, OffsetDateTime createdAtGt, OffsetDateTime createdAtLt, String sort, UUID applicantId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call listWorkflowRunsCall(Integer page, String status, OffsetDateTime createdAtGt, OffsetDateTime createdAtLt, String sort, UUID applicantId, List tags, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -7646,6 +7647,10 @@ public okhttp3.Call listWorkflowRunsCall(Integer page, String status, OffsetDate localVarQueryParams.addAll(localVarApiClient.parameterToPair("applicant_id", applicantId)); } + if (tags != null) { + localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "tags", tags)); + } + final String[] localVarAccepts = { "application/json" }; @@ -7666,8 +7671,8 @@ public okhttp3.Call listWorkflowRunsCall(Integer page, String status, OffsetDate } @SuppressWarnings("rawtypes") - private okhttp3.Call listWorkflowRunsValidateBeforeCall(Integer page, String status, OffsetDateTime createdAtGt, OffsetDateTime createdAtLt, String sort, UUID applicantId, final ApiCallback _callback) throws ApiException { - return listWorkflowRunsCall(page, status, createdAtGt, createdAtLt, sort, applicantId, _callback); + private okhttp3.Call listWorkflowRunsValidateBeforeCall(Integer page, String status, OffsetDateTime createdAtGt, OffsetDateTime createdAtLt, String sort, UUID applicantId, List tags, final ApiCallback _callback) throws ApiException { + return listWorkflowRunsCall(page, status, createdAtGt, createdAtLt, sort, applicantId, tags, _callback); } @@ -7680,6 +7685,7 @@ private okhttp3.Call listWorkflowRunsValidateBeforeCall(Integer page, String sta * @param createdAtLt A ISO-8601 date to filter results with a created date less than (before) the one provided. (optional) * @param sort A string with the value 'desc' or 'asc' that allows to sort the returned list by the completed datetime either descending or ascending, respectively. If not specified, defaults to 'desc'. (optional, default to desc) * @param applicantId the applicant's id. (optional) + * @param tags A list of tags to filter the results. (optional) * @return List<WorkflowRun> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -7690,8 +7696,8 @@ private okhttp3.Call listWorkflowRunsValidateBeforeCall(Integer page, String sta 0 Unexpected error - */ - public List listWorkflowRuns(Integer page, String status, OffsetDateTime createdAtGt, OffsetDateTime createdAtLt, String sort, UUID applicantId) throws ApiException { - ApiResponse> localVarResp = listWorkflowRunsWithHttpInfo(page, status, createdAtGt, createdAtLt, sort, applicantId); + public List listWorkflowRuns(Integer page, String status, OffsetDateTime createdAtGt, OffsetDateTime createdAtLt, String sort, UUID applicantId, List tags) throws ApiException { + ApiResponse> localVarResp = listWorkflowRunsWithHttpInfo(page, status, createdAtGt, createdAtLt, sort, applicantId, tags); return localVarResp.getData(); } @@ -7704,6 +7710,7 @@ public List listWorkflowRuns(Integer page, String status, OffsetDat * @param createdAtLt A ISO-8601 date to filter results with a created date less than (before) the one provided. (optional) * @param sort A string with the value 'desc' or 'asc' that allows to sort the returned list by the completed datetime either descending or ascending, respectively. If not specified, defaults to 'desc'. (optional, default to desc) * @param applicantId the applicant's id. (optional) + * @param tags A list of tags to filter the results. (optional) * @return ApiResponse<List<WorkflowRun>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -7714,8 +7721,8 @@ public List listWorkflowRuns(Integer page, String status, OffsetDat 0 Unexpected error - */ - public ApiResponse> listWorkflowRunsWithHttpInfo(Integer page, String status, OffsetDateTime createdAtGt, OffsetDateTime createdAtLt, String sort, UUID applicantId) throws ApiException { - okhttp3.Call localVarCall = listWorkflowRunsValidateBeforeCall(page, status, createdAtGt, createdAtLt, sort, applicantId, null); + public ApiResponse> listWorkflowRunsWithHttpInfo(Integer page, String status, OffsetDateTime createdAtGt, OffsetDateTime createdAtLt, String sort, UUID applicantId, List tags) throws ApiException { + okhttp3.Call localVarCall = listWorkflowRunsValidateBeforeCall(page, status, createdAtGt, createdAtLt, sort, applicantId, tags, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -7729,6 +7736,7 @@ public ApiResponse> listWorkflowRunsWithHttpInfo(Integer page, * @param createdAtLt A ISO-8601 date to filter results with a created date less than (before) the one provided. (optional) * @param sort A string with the value 'desc' or 'asc' that allows to sort the returned list by the completed datetime either descending or ascending, respectively. If not specified, defaults to 'desc'. (optional, default to desc) * @param applicantId the applicant's id. (optional) + * @param tags A list of tags to filter the results. (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -7740,9 +7748,9 @@ public ApiResponse> listWorkflowRunsWithHttpInfo(Integer page, 0 Unexpected error - */ - public okhttp3.Call listWorkflowRunsAsync(Integer page, String status, OffsetDateTime createdAtGt, OffsetDateTime createdAtLt, String sort, UUID applicantId, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call listWorkflowRunsAsync(Integer page, String status, OffsetDateTime createdAtGt, OffsetDateTime createdAtLt, String sort, UUID applicantId, List tags, final ApiCallback> _callback) throws ApiException { - okhttp3.Call localVarCall = listWorkflowRunsValidateBeforeCall(page, status, createdAtGt, createdAtLt, sort, applicantId, _callback); + okhttp3.Call localVarCall = listWorkflowRunsValidateBeforeCall(page, status, createdAtGt, createdAtLt, sort, applicantId, tags, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; diff --git a/src/main/java/com/onfido/model/ProofOfAddressProperties.java b/src/main/java/com/onfido/model/ProofOfAddressProperties.java index fa9e5a4..7ebb0b4 100644 --- a/src/main/java/com/onfido/model/ProofOfAddressProperties.java +++ b/src/main/java/com/onfido/model/ProofOfAddressProperties.java @@ -83,6 +83,20 @@ public enum DocumentTypeEnum { EXCHANGE_HOUSE_STATEMENT("exchange_house_statement"), + ACCOMMODATION_TENANCY_CERTIFICATE("accommodation_tenancy_certificate"), + + ADDRESS_CERTIFICATE("address_certificate"), + + ELECTRICITY_BILL("electricity_bill"), + + GAS_BILL("gas_bill"), + + INTERNET_BILL("internet_bill"), + + PHONE_BILL("phone_bill"), + + WATER_BILL("water_bill"), + UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api"); private String value; diff --git a/src/main/java/com/onfido/model/WebhookEventPayloadResource.java b/src/main/java/com/onfido/model/WebhookEventPayloadResource.java index 95b997b..431b900 100644 --- a/src/main/java/com/onfido/model/WebhookEventPayloadResource.java +++ b/src/main/java/com/onfido/model/WebhookEventPayloadResource.java @@ -122,6 +122,11 @@ public class WebhookEventPayloadResource { @javax.annotation.Nullable private List reasons = new ArrayList<>(); + public static final String SERIALIZED_NAME_TAGS = "tags"; + @SerializedName(SERIALIZED_NAME_TAGS) + @javax.annotation.Nullable + private List tags = new ArrayList<>(); + public static final String SERIALIZED_NAME_LINK = "link"; @SerializedName(SERIALIZED_NAME_LINK) @javax.annotation.Nullable @@ -395,6 +400,33 @@ public void setReasons(@javax.annotation.Nullable List reasons) { } + public WebhookEventPayloadResource tags(@javax.annotation.Nullable List tags) { + this.tags = tags; + return this; + } + + public WebhookEventPayloadResource addTagsItem(String tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } + this.tags.add(tagsItem); + return this; + } + + /** + * A list of tags associated with the Workflow Run. + * @return tags + */ + @javax.annotation.Nullable + public List getTags() { + return tags; + } + + public void setTags(@javax.annotation.Nullable List tags) { + this.tags = tags; + } + + public WebhookEventPayloadResource link(@javax.annotation.Nullable WorkflowRunLink link) { this.link = link; return this; @@ -519,6 +551,7 @@ public boolean equals(Object o) { Objects.equals(this.input, webhookEventPayloadResource.input) && Objects.equals(this.output, webhookEventPayloadResource.output) && Objects.equals(this.reasons, webhookEventPayloadResource.reasons) && + Objects.equals(this.tags, webhookEventPayloadResource.tags) && Objects.equals(this.link, webhookEventPayloadResource.link) && Objects.equals(this.error, webhookEventPayloadResource.error) && Objects.equals(this.customerUserId, webhookEventPayloadResource.customerUserId)&& @@ -531,7 +564,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(id, applicantId, createdAt, updatedAt, dashboardUrl, workflowId, workflowRunId, workflowVersionId, taskDefId, taskDefVersion, input, output, reasons, link, error, customerUserId, additionalProperties); + return Objects.hash(id, applicantId, createdAt, updatedAt, dashboardUrl, workflowId, workflowRunId, workflowVersionId, taskDefId, taskDefVersion, input, output, reasons, tags, link, error, customerUserId, additionalProperties); } private static int hashCodeNullable(JsonNullable a) { @@ -558,6 +591,7 @@ public String toString() { sb.append(" input: ").append(toIndentedString(input)).append("\n"); sb.append(" output: ").append(toIndentedString(output)).append("\n"); sb.append(" reasons: ").append(toIndentedString(reasons)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); sb.append(" link: ").append(toIndentedString(link)).append("\n"); sb.append(" error: ").append(toIndentedString(error)).append("\n"); sb.append(" customerUserId: ").append(toIndentedString(customerUserId)).append("\n"); @@ -597,6 +631,7 @@ private String toIndentedString(Object o) { openapiFields.add("input"); openapiFields.add("output"); openapiFields.add("reasons"); + openapiFields.add("tags"); openapiFields.add("link"); openapiFields.add("error"); openapiFields.add("customer_user_id"); @@ -643,6 +678,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("reasons") != null && !jsonObj.get("reasons").isJsonNull() && !jsonObj.get("reasons").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `reasons` to be an array in the JSON string but got `%s`", jsonObj.get("reasons").toString())); } + // ensure the optional json data is an array if present + if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); + } // validate the optional field `link` if (jsonObj.get("link") != null && !jsonObj.get("link").isJsonNull()) { WorkflowRunLink.validateJsonElement(jsonObj.get("link"));