Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .release.json
Original file line number Diff line number Diff line change
@@ -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"
}
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Add this dependency to your project's POM:
<dependency>
<groupId>com.onfido</groupId>
<artifactId>onfido-api-java</artifactId>
<version>6.5.0</version>
<version>6.6.0</version>
<scope>compile</scope>
</dependency>
```
Expand All @@ -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"
}
```

Expand All @@ -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 <https://search.maven.org/artifact/com.onfido/onfido-api-java/6.5.0/jar>.
The latest version can be found at <https://search.maven.org/artifact/com.onfido/onfido-api-java/6.6.0/jar>.

## Getting Started

Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<artifactId>onfido-api-java</artifactId>
<packaging>jar</packaging>
<name>onfido-api-java</name>
<version>6.5.0</version>
<version>6.6.0</version>
<url>https://documentation.onfido.com</url>
<description>Official Java API client library for the Onfido API</description>
<scm>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/onfido/ApiClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -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<String, Authentication>();
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/onfido/Configuration.java
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
26 changes: 17 additions & 9 deletions src/main/java/com/onfido/api/DefaultApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -7586,6 +7586,7 @@ public okhttp3.Call listWebhooksAsync(final ApiCallback<WebhooksList> _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 &#39;desc&#39; or &#39;asc&#39; that allows to sort the returned list by the completed datetime either descending or ascending, respectively. If not specified, defaults to &#39;desc&#39;. (optional, default to desc)
* @param applicantId the applicant&#39;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
Expand All @@ -7597,7 +7598,7 @@ public okhttp3.Call listWebhooksAsync(final ApiCallback<WebhooksList> _callback)
<tr><td> 0 </td><td> Unexpected error </td><td> - </td></tr>
</table>
*/
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<String> tags, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
Expand Down Expand Up @@ -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"
};
Expand All @@ -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<String> tags, final ApiCallback _callback) throws ApiException {
return listWorkflowRunsCall(page, status, createdAtGt, createdAtLt, sort, applicantId, tags, _callback);

}

Expand All @@ -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 &#39;desc&#39; or &#39;asc&#39; that allows to sort the returned list by the completed datetime either descending or ascending, respectively. If not specified, defaults to &#39;desc&#39;. (optional, default to desc)
* @param applicantId the applicant&#39;s id. (optional)
* @param tags A list of tags to filter the results. (optional)
* @return List&lt;WorkflowRun&gt;
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Expand All @@ -7690,8 +7696,8 @@ private okhttp3.Call listWorkflowRunsValidateBeforeCall(Integer page, String sta
<tr><td> 0 </td><td> Unexpected error </td><td> - </td></tr>
</table>
*/
public List<WorkflowRun> listWorkflowRuns(Integer page, String status, OffsetDateTime createdAtGt, OffsetDateTime createdAtLt, String sort, UUID applicantId) throws ApiException {
ApiResponse<List<WorkflowRun>> localVarResp = listWorkflowRunsWithHttpInfo(page, status, createdAtGt, createdAtLt, sort, applicantId);
public List<WorkflowRun> listWorkflowRuns(Integer page, String status, OffsetDateTime createdAtGt, OffsetDateTime createdAtLt, String sort, UUID applicantId, List<String> tags) throws ApiException {
ApiResponse<List<WorkflowRun>> localVarResp = listWorkflowRunsWithHttpInfo(page, status, createdAtGt, createdAtLt, sort, applicantId, tags);
return localVarResp.getData();
}

Expand All @@ -7704,6 +7710,7 @@ public List<WorkflowRun> 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 &#39;desc&#39; or &#39;asc&#39; that allows to sort the returned list by the completed datetime either descending or ascending, respectively. If not specified, defaults to &#39;desc&#39;. (optional, default to desc)
* @param applicantId the applicant&#39;s id. (optional)
* @param tags A list of tags to filter the results. (optional)
* @return ApiResponse&lt;List&lt;WorkflowRun&gt;&gt;
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Expand All @@ -7714,8 +7721,8 @@ public List<WorkflowRun> listWorkflowRuns(Integer page, String status, OffsetDat
<tr><td> 0 </td><td> Unexpected error </td><td> - </td></tr>
</table>
*/
public ApiResponse<List<WorkflowRun>> 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<List<WorkflowRun>> listWorkflowRunsWithHttpInfo(Integer page, String status, OffsetDateTime createdAtGt, OffsetDateTime createdAtLt, String sort, UUID applicantId, List<String> tags) throws ApiException {
okhttp3.Call localVarCall = listWorkflowRunsValidateBeforeCall(page, status, createdAtGt, createdAtLt, sort, applicantId, tags, null);
Type localVarReturnType = new TypeToken<List<WorkflowRun>>(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
Expand All @@ -7729,6 +7736,7 @@ public ApiResponse<List<WorkflowRun>> 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 &#39;desc&#39; or &#39;asc&#39; that allows to sort the returned list by the completed datetime either descending or ascending, respectively. If not specified, defaults to &#39;desc&#39;. (optional, default to desc)
* @param applicantId the applicant&#39;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
Expand All @@ -7740,9 +7748,9 @@ public ApiResponse<List<WorkflowRun>> listWorkflowRunsWithHttpInfo(Integer page,
<tr><td> 0 </td><td> Unexpected error </td><td> - </td></tr>
</table>
*/
public okhttp3.Call listWorkflowRunsAsync(Integer page, String status, OffsetDateTime createdAtGt, OffsetDateTime createdAtLt, String sort, UUID applicantId, final ApiCallback<List<WorkflowRun>> _callback) throws ApiException {
public okhttp3.Call listWorkflowRunsAsync(Integer page, String status, OffsetDateTime createdAtGt, OffsetDateTime createdAtLt, String sort, UUID applicantId, List<String> tags, final ApiCallback<List<WorkflowRun>> _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<List<WorkflowRun>>(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
Expand Down
14 changes: 14 additions & 0 deletions src/main/java/com/onfido/model/ProofOfAddressProperties.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
41 changes: 40 additions & 1 deletion src/main/java/com/onfido/model/WebhookEventPayloadResource.java
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,11 @@ public class WebhookEventPayloadResource {
@javax.annotation.Nullable
private List<String> reasons = new ArrayList<>();

public static final String SERIALIZED_NAME_TAGS = "tags";
@SerializedName(SERIALIZED_NAME_TAGS)
@javax.annotation.Nullable
private List<String> tags = new ArrayList<>();

public static final String SERIALIZED_NAME_LINK = "link";
@SerializedName(SERIALIZED_NAME_LINK)
@javax.annotation.Nullable
Expand Down Expand Up @@ -395,6 +400,33 @@ public void setReasons(@javax.annotation.Nullable List<String> reasons) {
}


public WebhookEventPayloadResource tags(@javax.annotation.Nullable List<String> 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<String> getTags() {
return tags;
}

public void setTags(@javax.annotation.Nullable List<String> tags) {
this.tags = tags;
}


public WebhookEventPayloadResource link(@javax.annotation.Nullable WorkflowRunLink link) {
this.link = link;
return this;
Expand Down Expand Up @@ -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)&&
Expand All @@ -531,7 +564,7 @@ private static <T> boolean equalsNullable(JsonNullable<T> a, JsonNullable<T> 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 <T> int hashCodeNullable(JsonNullable<T> a) {
Expand All @@ -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");
Expand Down Expand Up @@ -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");
Expand Down Expand Up @@ -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"));
Expand Down