Skip to content

Commit

Permalink
Merge pull request #122 from onfido/release-upgrade
Browse files Browse the repository at this point in the history
Refresh onfido-java after onfido-openapi-spec update (40b86a1)
  • Loading branch information
dvacca-onfido committed Jul 17, 2024
2 parents f5b4e5a + 7eb79ce commit 0d179e2
Show file tree
Hide file tree
Showing 20 changed files with 474 additions and 101 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": "01ed1b5",
"long_sha": "01ed1b5fe0f7490bfce54816504a9fec13b33862",
"version": "v3.1.0"
"short_sha": "40b86a1",
"long_sha": "40b86a1c8ec8687c15514470f60428b3e7633968",
"version": "v3.2.0"
},
"release": "v3.3.0"
"release": "v4.0.0"
}
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>3.3.0</version>
<version>4.0.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:3.3.0"
implementation "com.onfido:onfido-api-java:4.0.0"
}
```

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

Then manually install the following JARs:

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

The latest version can be found at: https://search.maven.org/artifact/com.onfido/3.3.0
The latest version can be found at: https://search.maven.org/artifact/com.onfido/4.0.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 = '3.3.0'
version = '4.0.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 := "3.3.0",
version := "4.0.0",
scalaVersion := "2.11.4",
scalacOptions ++= Seq("-feature"),
javacOptions in compile ++= Seq("-Xlint:deprecation"),
Expand Down
Binary file added media/another_sample_driving_licence.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion media/another_sample_driving_licence.png

This file was deleted.

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>3.3.0</version>
<version>4.0.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/3.3.0");
setUserAgent("onfido-java/4.0.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 = "3.3.0";
public static final String VERSION = "4.0.0";

private static ApiClient defaultApiClient = new ApiClient();

Expand Down
148 changes: 148 additions & 0 deletions src/main/java/com/onfido/api/DefaultApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -2671,6 +2671,154 @@ public okhttp3.Call downloadMotionCaptureFrameAsync(UUID motionCaptureId, final
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for downloadQesDocument
* @param workflowRunId The unique identifier of the Workflow Run for which you want to retrieve the signed document. (required)
* @param fileId The unique identifier of the file which you want to retrieve. (required)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 302 </td><td> Found </td><td> * Location - Link to the Timeline File. <br> </td></tr>
<tr><td> 200 </td><td> The signed document PDF binary data. </td><td> - </td></tr>
<tr><td> 0 </td><td> Unexpected error </td><td> - </td></tr>
</table>
*/
public okhttp3.Call downloadQesDocumentCall(UUID workflowRunId, UUID fileId, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };

// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}

Object localVarPostBody = null;

// create path and map variables
String localVarPath = "/qualified_electronic_signature/documents";

List<Pair> localVarQueryParams = new ArrayList<Pair>();
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, String> localVarCookieParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();

if (workflowRunId != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("workflow_run_id", workflowRunId));
}

if (fileId != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("file_id", fileId));
}

final String[] localVarAccepts = {
"application/pdf",
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}

final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}

String[] localVarAuthNames = new String[] { "Token" };
return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}

@SuppressWarnings("rawtypes")
private okhttp3.Call downloadQesDocumentValidateBeforeCall(UUID workflowRunId, UUID fileId, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'workflowRunId' is set
if (workflowRunId == null) {
throw new ApiException("Missing the required parameter 'workflowRunId' when calling downloadQesDocument(Async)");
}

// verify the required parameter 'fileId' is set
if (fileId == null) {
throw new ApiException("Missing the required parameter 'fileId' when calling downloadQesDocument(Async)");
}

return downloadQesDocumentCall(workflowRunId, fileId, _callback);

}

/**
* Retrieves the signed document or application form
* Retrieves the signed document or application form depending on the file_id provided.
* @param workflowRunId The unique identifier of the Workflow Run for which you want to retrieve the signed document. (required)
* @param fileId The unique identifier of the file which you want to retrieve. (required)
* @return FileTransfer
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 302 </td><td> Found </td><td> * Location - Link to the Timeline File. <br> </td></tr>
<tr><td> 200 </td><td> The signed document PDF binary data. </td><td> - </td></tr>
<tr><td> 0 </td><td> Unexpected error </td><td> - </td></tr>
</table>
*/
public FileTransfer downloadQesDocument(UUID workflowRunId, UUID fileId) throws ApiException {
ApiResponse<FileTransfer> localVarResp = downloadQesDocumentWithHttpInfo(workflowRunId, fileId);
return localVarResp.getData();
}

/**
* Retrieves the signed document or application form
* Retrieves the signed document or application form depending on the file_id provided.
* @param workflowRunId The unique identifier of the Workflow Run for which you want to retrieve the signed document. (required)
* @param fileId The unique identifier of the file which you want to retrieve. (required)
* @return ApiResponse&lt;FileTransfer&gt;
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 302 </td><td> Found </td><td> * Location - Link to the Timeline File. <br> </td></tr>
<tr><td> 200 </td><td> The signed document PDF binary data. </td><td> - </td></tr>
<tr><td> 0 </td><td> Unexpected error </td><td> - </td></tr>
</table>
*/
public ApiResponse<FileTransfer> downloadQesDocumentWithHttpInfo(UUID workflowRunId, UUID fileId) throws ApiException {
okhttp3.Call localVarCall = downloadQesDocumentValidateBeforeCall(workflowRunId, fileId, null);
Type localVarReturnType = new TypeToken<FileTransfer>(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}

/**
* Retrieves the signed document or application form (asynchronously)
* Retrieves the signed document or application form depending on the file_id provided.
* @param workflowRunId The unique identifier of the Workflow Run for which you want to retrieve the signed document. (required)
* @param fileId The unique identifier of the file which you want to retrieve. (required)
* @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
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 302 </td><td> Found </td><td> * Location - Link to the Timeline File. <br> </td></tr>
<tr><td> 200 </td><td> The signed document PDF binary data. </td><td> - </td></tr>
<tr><td> 0 </td><td> Unexpected error </td><td> - </td></tr>
</table>
*/
public okhttp3.Call downloadQesDocumentAsync(UUID workflowRunId, UUID fileId, final ApiCallback<FileTransfer> _callback) throws ApiException {

okhttp3.Call localVarCall = downloadQesDocumentValidateBeforeCall(workflowRunId, fileId, _callback);
Type localVarReturnType = new TypeToken<FileTransfer>(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for downloadSignedEvidenceFile
* @param workflowRunId Workflow Run ID (required)
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/com/onfido/model/Document.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ public class Document {
public enum FileTypeEnum {
JPG("jpg"),

JPEG("jpeg"),

PNG("png"),

PDF("pdf"),
Expand Down
Loading

0 comments on commit 0d179e2

Please sign in to comment.