Skip to content

Commit

Permalink
Merge pull request #124 from onfido/release-upgrade
Browse files Browse the repository at this point in the history
Refresh onfido-java after onfido-openapi-spec update (f941ec8)
  • Loading branch information
dvacca-onfido authored Jul 24, 2024
2 parents 33ca09c + 01f19cb commit 4b1146a
Show file tree
Hide file tree
Showing 12 changed files with 182 additions and 25 deletions.
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": "40b86a1",
"long_sha": "40b86a1c8ec8687c15514470f60428b3e7633968",
"version": "v3.2.0"
"short_sha": "f941ec8",
"long_sha": "f941ec84c3aeb0d3fcceea537991ba7e1ac96414",
"version": "v3.3.0"
},
"release": "v4.0.0"
"release": "v4.1.0"
}
12 changes: 6 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
## v4.0.0 17th July 2024

- Release based on Onfido OpenAPI spec version [v3.2.0](https://github.com/onfido/onfido-openapi-spec/releases/tag/v3.2.0):
- [CAT-1289] Document report's properties: Add middle name
- chore(qes): add documents endpoint
- [CAT-1297] Webhook Event: remove uuid format from object.id
- fix(qes): fix download document http method
- Add started_at_iso8601 field in webhook event
- add jpeg file type for documents
- [CAT-1289] Document report's properties: Add middle name
- chore(qes): add documents endpoint
- [CAT-1297] Webhook Event: remove uuid format from object.id
- fix(qes): fix download document http method
- Add started_at_iso8601 field in webhook event
- add jpeg file type for documents

## v3.3.0 2nd July 2024

Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Add this dependency to your project's POM:
<dependency>
<groupId>com.onfido</groupId>
<artifactId>onfido-api-java</artifactId>
<version>4.0.0</version>
<version>4.1.0</version>
<scope>compile</scope>
</dependency>
```
Expand All @@ -59,7 +59,7 @@ Add this dependency to your project's build file:
}
dependencies {
implementation "com.onfido:onfido-api-java:4.0.0"
implementation "com.onfido:onfido-api-java:4.1.0"
}
```

Expand All @@ -73,10 +73,10 @@ mvn clean package

Then manually install the following JARs:

- `target/onfido-api-java-4.0.0.jar`
- `target/onfido-api-java-4.1.0.jar`
- `target/lib/*.jar`

The latest version can be found at: https://search.maven.org/artifact/com.onfido/4.0.0
The latest version can be found at: https://search.maven.org/artifact/com.onfido/4.1.0

## 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 = '4.0.0'
version = '4.1.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 := "4.0.0",
version := "4.1.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>4.0.0</version>
<version>4.1.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 @@ -160,7 +160,7 @@ private void init() {
json = new JSON();

// Set default User-Agent.
setUserAgent("onfido-java/4.0.0");
setUserAgent("onfido-java/4.1.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.6.0")
public class Configuration {
public static final String VERSION = "4.0.0";
public static final String VERSION = "4.1.0";

private static ApiClient defaultApiClient = new ApiClient();

Expand Down
62 changes: 60 additions & 2 deletions src/main/java/com/onfido/model/WorkflowRun.java
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ public class WorkflowRun {
@SerializedName(SERIALIZED_NAME_TAGS)
private List<String> tags;

public static final String SERIALIZED_NAME_CUSTOMER_USER_ID = "customer_user_id";
@SerializedName(SERIALIZED_NAME_CUSTOMER_USER_ID)
private String customerUserId;

public static final String SERIALIZED_NAME_LINK = "link";
@SerializedName(SERIALIZED_NAME_LINK)
private WorkflowRunSharedLink link;
Expand Down Expand Up @@ -174,6 +178,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
@SerializedName(SERIALIZED_NAME_ERROR)
private WorkflowRunResponseError error;

public static final String SERIALIZED_NAME_SDK_TOKEN = "sdk_token";
@SerializedName(SERIALIZED_NAME_SDK_TOKEN)
private String sdkToken;

public WorkflowRun() {
}

Expand Down Expand Up @@ -242,6 +250,25 @@ public void setTags(List<String> tags) {
}


public WorkflowRun customerUserId(String customerUserId) {
this.customerUserId = customerUserId;
return this;
}

/**
* Customer-provided user identifier.
* @return customerUserId
**/
@javax.annotation.Nullable
public String getCustomerUserId() {
return customerUserId;
}

public void setCustomerUserId(String customerUserId) {
this.customerUserId = customerUserId;
}


public WorkflowRun link(WorkflowRunSharedLink link) {
this.link = link;
return this;
Expand Down Expand Up @@ -439,6 +466,25 @@ public void setError(WorkflowRunResponseError error) {
this.error = error;
}


public WorkflowRun sdkToken(String sdkToken) {
this.sdkToken = sdkToken;
return this;
}

/**
* Client token to use when loading this workflow run in the Onfido SDK.
* @return sdkToken
**/
@javax.annotation.Nullable
public String getSdkToken() {
return sdkToken;
}

public void setSdkToken(String sdkToken) {
this.sdkToken = sdkToken;
}

/**
* A container for additional, undeclared properties.
* This is a holder for any undeclared properties as specified with
Expand Down Expand Up @@ -497,6 +543,7 @@ public boolean equals(Object o) {
return Objects.equals(this.applicantId, workflowRun.applicantId) &&
Objects.equals(this.workflowId, workflowRun.workflowId) &&
Objects.equals(this.tags, workflowRun.tags) &&
Objects.equals(this.customerUserId, workflowRun.customerUserId) &&
Objects.equals(this.link, workflowRun.link) &&
Objects.equals(this.createdAt, workflowRun.createdAt) &&
Objects.equals(this.updatedAt, workflowRun.updatedAt) &&
Expand All @@ -506,7 +553,8 @@ public boolean equals(Object o) {
Objects.equals(this.status, workflowRun.status) &&
Objects.equals(this.output, workflowRun.output) &&
Objects.equals(this.reasons, workflowRun.reasons) &&
Objects.equals(this.error, workflowRun.error)&&
Objects.equals(this.error, workflowRun.error) &&
Objects.equals(this.sdkToken, workflowRun.sdkToken)&&
Objects.equals(this.additionalProperties, workflowRun.additionalProperties);
}

Expand All @@ -516,7 +564,7 @@ private static <T> boolean equalsNullable(JsonNullable<T> a, JsonNullable<T> b)

@Override
public int hashCode() {
return Objects.hash(applicantId, workflowId, tags, link, createdAt, updatedAt, id, workflowVersionId, dashboardUrl, status, output, reasons, error, additionalProperties);
return Objects.hash(applicantId, workflowId, tags, customerUserId, link, createdAt, updatedAt, id, workflowVersionId, dashboardUrl, status, output, reasons, error, sdkToken, additionalProperties);
}

private static <T> int hashCodeNullable(JsonNullable<T> a) {
Expand All @@ -533,6 +581,7 @@ public String toString() {
sb.append(" applicantId: ").append(toIndentedString(applicantId)).append("\n");
sb.append(" workflowId: ").append(toIndentedString(workflowId)).append("\n");
sb.append(" tags: ").append(toIndentedString(tags)).append("\n");
sb.append(" customerUserId: ").append(toIndentedString(customerUserId)).append("\n");
sb.append(" link: ").append(toIndentedString(link)).append("\n");
sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n");
sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n");
Expand All @@ -543,6 +592,7 @@ public String toString() {
sb.append(" output: ").append(toIndentedString(output)).append("\n");
sb.append(" reasons: ").append(toIndentedString(reasons)).append("\n");
sb.append(" error: ").append(toIndentedString(error)).append("\n");
sb.append(" sdkToken: ").append(toIndentedString(sdkToken)).append("\n");
sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n");
sb.append("}");
return sb.toString();
Expand All @@ -569,6 +619,7 @@ private String toIndentedString(Object o) {
openapiFields.add("applicant_id");
openapiFields.add("workflow_id");
openapiFields.add("tags");
openapiFields.add("customer_user_id");
openapiFields.add("link");
openapiFields.add("created_at");
openapiFields.add("updated_at");
Expand All @@ -579,6 +630,7 @@ private String toIndentedString(Object o) {
openapiFields.add("output");
openapiFields.add("reasons");
openapiFields.add("error");
openapiFields.add("sdk_token");

// a set of required properties/fields (JSON key names)
openapiRequiredFields = new HashSet<String>();
Expand Down Expand Up @@ -617,6 +669,9 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
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()));
}
if ((jsonObj.get("customer_user_id") != null && !jsonObj.get("customer_user_id").isJsonNull()) && !jsonObj.get("customer_user_id").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `customer_user_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customer_user_id").toString()));
}
// validate the optional field `link`
if (jsonObj.get("link") != null && !jsonObj.get("link").isJsonNull()) {
WorkflowRunSharedLink.validateJsonElement(jsonObj.get("link"));
Expand All @@ -642,6 +697,9 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
if (jsonObj.get("error") != null && !jsonObj.get("error").isJsonNull()) {
WorkflowRunResponseError.validateJsonElement(jsonObj.get("error"));
}
if ((jsonObj.get("sdk_token") != null && !jsonObj.get("sdk_token").isJsonNull()) && !jsonObj.get("sdk_token").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `sdk_token` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sdk_token").toString()));
}
}

public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
Expand Down
31 changes: 30 additions & 1 deletion src/main/java/com/onfido/model/WorkflowRunBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ public class WorkflowRunBuilder {
@SerializedName(SERIALIZED_NAME_TAGS)
private List<String> tags;

public static final String SERIALIZED_NAME_CUSTOMER_USER_ID = "customer_user_id";
@SerializedName(SERIALIZED_NAME_CUSTOMER_USER_ID)
private String customerUserId;

public static final String SERIALIZED_NAME_LINK = "link";
@SerializedName(SERIALIZED_NAME_LINK)
private WorkflowRunSharedLink link;
Expand Down Expand Up @@ -155,6 +159,25 @@ public void setTags(List<String> tags) {
}


public WorkflowRunBuilder customerUserId(String customerUserId) {
this.customerUserId = customerUserId;
return this;
}

/**
* Customer-provided user identifier.
* @return customerUserId
**/
@javax.annotation.Nullable
public String getCustomerUserId() {
return customerUserId;
}

public void setCustomerUserId(String customerUserId) {
this.customerUserId = customerUserId;
}


public WorkflowRunBuilder link(WorkflowRunSharedLink link) {
this.link = link;
return this;
Expand Down Expand Up @@ -296,6 +319,7 @@ public boolean equals(Object o) {
return Objects.equals(this.applicantId, workflowRunBuilder.applicantId) &&
Objects.equals(this.workflowId, workflowRunBuilder.workflowId) &&
Objects.equals(this.tags, workflowRunBuilder.tags) &&
Objects.equals(this.customerUserId, workflowRunBuilder.customerUserId) &&
Objects.equals(this.link, workflowRunBuilder.link) &&
Objects.equals(this.createdAt, workflowRunBuilder.createdAt) &&
Objects.equals(this.updatedAt, workflowRunBuilder.updatedAt) &&
Expand All @@ -309,7 +333,7 @@ private static <T> boolean equalsNullable(JsonNullable<T> a, JsonNullable<T> b)

@Override
public int hashCode() {
return Objects.hash(applicantId, workflowId, tags, link, createdAt, updatedAt, customData, additionalProperties);
return Objects.hash(applicantId, workflowId, tags, customerUserId, link, createdAt, updatedAt, customData, additionalProperties);
}

private static <T> int hashCodeNullable(JsonNullable<T> a) {
Expand All @@ -326,6 +350,7 @@ public String toString() {
sb.append(" applicantId: ").append(toIndentedString(applicantId)).append("\n");
sb.append(" workflowId: ").append(toIndentedString(workflowId)).append("\n");
sb.append(" tags: ").append(toIndentedString(tags)).append("\n");
sb.append(" customerUserId: ").append(toIndentedString(customerUserId)).append("\n");
sb.append(" link: ").append(toIndentedString(link)).append("\n");
sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n");
sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n");
Expand Down Expand Up @@ -356,6 +381,7 @@ private String toIndentedString(Object o) {
openapiFields.add("applicant_id");
openapiFields.add("workflow_id");
openapiFields.add("tags");
openapiFields.add("customer_user_id");
openapiFields.add("link");
openapiFields.add("created_at");
openapiFields.add("updated_at");
Expand Down Expand Up @@ -397,6 +423,9 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
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()));
}
if ((jsonObj.get("customer_user_id") != null && !jsonObj.get("customer_user_id").isJsonNull()) && !jsonObj.get("customer_user_id").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `customer_user_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customer_user_id").toString()));
}
// validate the optional field `link`
if (jsonObj.get("link") != null && !jsonObj.get("link").isJsonNull()) {
WorkflowRunSharedLink.validateJsonElement(jsonObj.get("link"));
Expand Down
Loading

0 comments on commit 4b1146a

Please sign in to comment.