From 3be6c9c795248a58147612357f70807e33092c7f Mon Sep 17 00:00:00 2001 From: Juan Treminio Date: Tue, 29 Oct 2024 15:02:07 -0500 Subject: [PATCH] Release 1.7.0 --- .github/workflows/github-actions.yml | 4 +- README.md | 20 +- VERSION | 2 +- build.gradle | 2 +- build.sbt | 2 +- docs/AccountResponseQuotas.md | 2 +- docs/FaxApi.md | 364 +++++++ docs/FaxGetResponse.md | 15 + docs/FaxListResponse.md | 15 + docs/FaxResponse.md | 23 + docs/FaxResponseTransmission.md | 32 + docs/FaxSendRequest.md | 22 + docs/OAuthApi.md | 2 + docs/OAuthTokenRefreshRequest.md | 2 + docs/SignatureRequestApi.md | 2 +- docs/TemplateApi.md | 4 +- docs/TemplateResponse.md | 3 +- docs/TemplateResponseDocumentFormFieldBase.md | 1 - ...mplateResponseDocumentFormFieldCheckbox.md | 1 + ...lateResponseDocumentFormFieldDateSigned.md | 1 + ...mplateResponseDocumentFormFieldDropdown.md | 1 + ...plateResponseDocumentFormFieldHyperlink.md | 1 + ...mplateResponseDocumentFormFieldInitials.md | 1 + .../TemplateResponseDocumentFormFieldRadio.md | 1 + ...plateResponseDocumentFormFieldSignature.md | 1 + docs/TemplateResponseDocumentFormFieldText.md | 1 + examples/FaxDelete.java | 25 + examples/FaxFiles.java | 28 + examples/FaxGet.java | 27 + examples/FaxList.java | 28 + examples/FaxSend.java | 37 + gradle.properties | 2 +- openapi-config.yaml | 2 +- openapi-sdk.yaml | 933 +++++++++++++++--- pom.xml | 2 +- run-build | 9 + src/main/java/com/dropbox/sign/ApiClient.java | 2 +- .../java/com/dropbox/sign/Configuration.java | 2 +- .../java/com/dropbox/sign/api/FaxApi.java | 421 ++++++++ .../java/com/dropbox/sign/api/OAuthApi.java | 4 + .../dropbox/sign/model/FaxGetResponse.java | 221 +++++ .../dropbox/sign/model/FaxListResponse.java | 224 +++++ .../com/dropbox/sign/model/FaxResponse.java | 627 ++++++++++++ .../sign/model/FaxResponseTransmission.java | 360 +++++++ .../dropbox/sign/model/FaxSendRequest.java | 576 +++++++++++ .../sign/model/OAuthTokenRefreshRequest.java | 106 +- .../sign/model/SubWhiteLabelingOptions.java | 24 +- .../dropbox/sign/model/TemplateResponse.java | 66 +- ...TemplateResponseDocumentFormFieldBase.java | 53 +- ...lateResponseDocumentFormFieldCheckbox.java | 53 +- ...teResponseDocumentFormFieldDateSigned.java | 53 +- ...lateResponseDocumentFormFieldDropdown.java | 53 +- ...ateResponseDocumentFormFieldHyperlink.java | 57 +- ...lateResponseDocumentFormFieldInitials.java | 53 +- ...emplateResponseDocumentFormFieldRadio.java | 54 +- ...ateResponseDocumentFormFieldSignature.java | 53 +- ...TemplateResponseDocumentFormFieldText.java | 50 +- test_fixtures/ApiAppCreateRequest.json | 20 +- test_fixtures/ApiAppGetResponse.json | 21 +- test_fixtures/ApiAppListResponse.json | 8 +- test_fixtures/ApiAppUpdateRequest.json | 22 +- test_fixtures/FaxGetResponse.json | 23 + test_fixtures/FaxListResponse.json | 31 + test_fixtures/FaxSendRequest.json | 14 + test_fixtures/FaxSendResponse.json | 16 + test_fixtures/TeamGetResponse.json | 5 + test_fixtures/TemplateGetResponse.json | 503 +--------- test_fixtures/TemplateListResponse.json | 39 +- 68 files changed, 4708 insertions(+), 724 deletions(-) create mode 100644 docs/FaxApi.md create mode 100644 docs/FaxGetResponse.md create mode 100644 docs/FaxListResponse.md create mode 100644 docs/FaxResponse.md create mode 100644 docs/FaxResponseTransmission.md create mode 100644 docs/FaxSendRequest.md create mode 100644 examples/FaxDelete.java create mode 100644 examples/FaxFiles.java create mode 100644 examples/FaxGet.java create mode 100644 examples/FaxList.java create mode 100644 examples/FaxSend.java create mode 100644 src/main/java/com/dropbox/sign/api/FaxApi.java create mode 100644 src/main/java/com/dropbox/sign/model/FaxGetResponse.java create mode 100644 src/main/java/com/dropbox/sign/model/FaxListResponse.java create mode 100644 src/main/java/com/dropbox/sign/model/FaxResponse.java create mode 100644 src/main/java/com/dropbox/sign/model/FaxResponseTransmission.java create mode 100644 src/main/java/com/dropbox/sign/model/FaxSendRequest.java create mode 100644 test_fixtures/FaxGetResponse.json create mode 100644 test_fixtures/FaxListResponse.json create mode 100644 test_fixtures/FaxSendRequest.json create mode 100644 test_fixtures/FaxSendResponse.json diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index b6fa96b..4733ead 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -21,6 +21,9 @@ jobs: - name: Build SDK run: ./run-build + env: + DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}} + DOCKER_TOKEN: ${{secrets.DOCKER_TOKEN}} - name: Ensure no changes in Generated Code run: ./bin/check-clean-git-status @@ -91,4 +94,3 @@ jobs: ref: "refs/tags/" + process.env.PACKAGE_VERSION, sha: context.sha }) - diff --git a/README.md b/README.md index 4f76938..6a14818 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,7 @@ Add this dependency to your project's POM: com.dropbox.sign dropbox-sign - 1.6.1 + 1.7.0 compile ``` @@ -71,7 +71,7 @@ Add this dependency to your project's build file: } dependencies { - implementation "com.dropbox.sign:dropbox-sign:1.6.1" + implementation "com.dropbox.sign:dropbox-sign:1.7.0" } ``` @@ -85,7 +85,7 @@ mvn clean package Then manually install the following JARs: -- `target/dropbox-sign-1.6.1.jar` +- `target/dropbox-sign-1.7.0.jar` - `target/lib/*.jar` ## Getting Started @@ -177,6 +177,11 @@ Class | Method | HTTP request | Description *BulkSendJobApi* | [**bulkSendJobList**](docs/BulkSendJobApi.md#bulkSendJobList) | **GET** /bulk_send_job/list | List Bulk Send Jobs *EmbeddedApi* | [**embeddedEditUrl**](docs/EmbeddedApi.md#embeddedEditUrl) | **POST** /embedded/edit_url/{template_id} | Get Embedded Template Edit URL *EmbeddedApi* | [**embeddedSignUrl**](docs/EmbeddedApi.md#embeddedSignUrl) | **GET** /embedded/sign_url/{signature_id} | Get Embedded Sign URL +*FaxApi* | [**faxDelete**](docs/FaxApi.md#faxDelete) | **DELETE** /fax/{fax_id} | Delete Fax +*FaxApi* | [**faxFiles**](docs/FaxApi.md#faxFiles) | **GET** /fax/files/{fax_id} | List Fax Files +*FaxApi* | [**faxGet**](docs/FaxApi.md#faxGet) | **GET** /fax/{fax_id} | Get Fax +*FaxApi* | [**faxList**](docs/FaxApi.md#faxList) | **GET** /fax/list | Lists Faxes +*FaxApi* | [**faxSend**](docs/FaxApi.md#faxSend) | **POST** /fax/send | Send Fax *FaxLineApi* | [**faxLineAddUser**](docs/FaxLineApi.md#faxLineAddUser) | **PUT** /fax_line/add_user | Add Fax Line User *FaxLineApi* | [**faxLineAreaCodeGet**](docs/FaxLineApi.md#faxLineAreaCodeGet) | **GET** /fax_line/area_codes | Get Available Fax Line Area Codes *FaxLineApi* | [**faxLineCreate**](docs/FaxLineApi.md#faxLineCreate) | **POST** /fax_line/create | Purchase Fax Line @@ -214,7 +219,7 @@ Class | Method | HTTP request | Description *TeamApi* | [**teamSubTeams**](docs/TeamApi.md#teamSubTeams) | **GET** /team/sub_teams/{team_id} | List Sub Teams *TeamApi* | [**teamUpdate**](docs/TeamApi.md#teamUpdate) | **PUT** /team | Update Team *TemplateApi* | [**templateAddUser**](docs/TemplateApi.md#templateAddUser) | **POST** /template/add_user/{template_id} | Add User to Template -*TemplateApi* | [**templateCreate**](docs/TemplateApi.md#templateCreate) | **POST** /template/create | Create Template +*TemplateApi* | [**templateCreate**](docs/TemplateApi.md#templateCreate) | **POST** /template/create | Create Template *TemplateApi* | [**templateCreateEmbeddedDraft**](docs/TemplateApi.md#templateCreateEmbeddedDraft) | **POST** /template/create_embedded_draft | Create Embedded Template Draft *TemplateApi* | [**templateDelete**](docs/TemplateApi.md#templateDelete) | **POST** /template/delete/{template_id} | Delete Template *TemplateApi* | [**templateFiles**](docs/TemplateApi.md#templateFiles) | **GET** /template/files/{template_id} | Get Template Files @@ -266,6 +271,7 @@ Class | Method | HTTP request | Description - [EventCallbackRequest](docs/EventCallbackRequest.md) - [EventCallbackRequestEvent](docs/EventCallbackRequestEvent.md) - [EventCallbackRequestEventMetadata](docs/EventCallbackRequestEventMetadata.md) + - [FaxGetResponse](docs/FaxGetResponse.md) - [FaxLineAddUserRequest](docs/FaxLineAddUserRequest.md) - [FaxLineAreaCodeGetCountryEnum](docs/FaxLineAreaCodeGetCountryEnum.md) - [FaxLineAreaCodeGetProvinceEnum](docs/FaxLineAreaCodeGetProvinceEnum.md) @@ -277,6 +283,10 @@ Class | Method | HTTP request | Description - [FaxLineRemoveUserRequest](docs/FaxLineRemoveUserRequest.md) - [FaxLineResponse](docs/FaxLineResponse.md) - [FaxLineResponseFaxLine](docs/FaxLineResponseFaxLine.md) + - [FaxListResponse](docs/FaxListResponse.md) + - [FaxResponse](docs/FaxResponse.md) + - [FaxResponseTransmission](docs/FaxResponseTransmission.md) + - [FaxSendRequest](docs/FaxSendRequest.md) - [FileResponse](docs/FileResponse.md) - [FileResponseDataUri](docs/FileResponseDataUri.md) - [ListInfoResponse](docs/ListInfoResponse.md) @@ -449,7 +459,7 @@ apisupport@hellosign.com This Java package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: `3.0.0` - - Package version: `1.6.1` + - Package version: `1.7.0` - Build package: `org.openapitools.codegen.languages.JavaClientCodegen` diff --git a/VERSION b/VERSION index 9c6d629..bd8bf88 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.6.1 +1.7.0 diff --git a/build.gradle b/build.gradle index 8770be1..c4d7ad8 100644 --- a/build.gradle +++ b/build.gradle @@ -21,7 +21,7 @@ apply plugin: 'signing' group = 'com.dropbox.sign' archivesBaseName = 'dropbox-sign' -version = '1.6.1' +version = '1.7.0' sourceCompatibility = JavaVersion.VERSION_1_8 targetCompatibility = JavaVersion.VERSION_1_8 diff --git a/build.sbt b/build.sbt index df03cf3..411ad49 100644 --- a/build.sbt +++ b/build.sbt @@ -2,7 +2,7 @@ lazy val root = (project in file(".")). settings( organization := "com.dropbox.sign", name := "dropbox-sign", - version := "1.6.1", + version := "1.7.0", scalaVersion := "2.11.4", scalacOptions ++= Seq("-feature"), Compile / javacOptions ++= Seq("-Xlint:deprecation"), diff --git a/docs/AccountResponseQuotas.md b/docs/AccountResponseQuotas.md index 3b7fe4e..e7510a8 100644 --- a/docs/AccountResponseQuotas.md +++ b/docs/AccountResponseQuotas.md @@ -12,7 +12,7 @@ Details concerning remaining monthly quotas. | `documentsLeft` | ```Integer``` | Signature requests remaining. | | | `templatesTotal` | ```Integer``` | Total API templates allowed. | | | `templatesLeft` | ```Integer``` | API templates remaining. | | -| `smsVerificationsLeft` | ```Integer``` | SMS verifications remaining. | | +| `smsVerificationsLeft` | ```Integer``` | SMS verifications remaining. | | | `numFaxPagesLeft` | ```Integer``` | Number of fax pages left | | diff --git a/docs/FaxApi.md b/docs/FaxApi.md new file mode 100644 index 0000000..a3d9bae --- /dev/null +++ b/docs/FaxApi.md @@ -0,0 +1,364 @@ +# FaxApi + +All URIs are relative to *https://api.hellosign.com/v3* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +[**faxDelete**](FaxApi.md#faxDelete) | **DELETE** /fax/{fax_id} | Delete Fax +[**faxFiles**](FaxApi.md#faxFiles) | **GET** /fax/files/{fax_id} | List Fax Files +[**faxGet**](FaxApi.md#faxGet) | **GET** /fax/{fax_id} | Get Fax +[**faxList**](FaxApi.md#faxList) | **GET** /fax/list | Lists Faxes +[**faxSend**](FaxApi.md#faxSend) | **POST** /fax/send | Send Fax + + + +## faxDelete + +> faxDelete(faxId) + +Delete Fax + +Deletes the specified Fax from the system. + +### Example + +```java +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.model.*; + +import java.util.List; + +public class Example { + public static void main(String[] args) { + var apiClient = Configuration.getDefaultApiClient() + .setApiKey("YOUR_API_KEY"); + + var faxApi = new FaxApi(apiClient); + + try { + faxApi.faxDelete("fa5c8a0b0f492d768749333ad6fcc214c111e967"); + } catch (ApiException e) { + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} + +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| + **faxId** | **String**| Fax ID | + +### Return type + +null (empty response body) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + + +## faxFiles + +> File faxFiles(faxId) + +List Fax Files + +Returns list of fax files + +### Example + +```java +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.model.*; + +import java.io.File; + +public class Example { + public static void main(String[] args) { + var apiClient = Configuration.getDefaultApiClient() + .setApiKey("YOUR_API_KEY"); + + var faxApi = new FaxApi(apiClient); + + var faxId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; + + try { + File result = faxApi.faxFiles(faxId); + result.renameTo(new File("file_response.pdf"));; + } catch (ApiException e) { + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} + +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| + **faxId** | **String**| Fax ID | + +### Return type + +[**File**](File.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/pdf, application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + + +## faxGet + +> FaxGetResponse faxGet(faxId) + +Get Fax + +Returns information about fax + +### Example + +```java +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.model.*; + +public class Example { + public static void main(String[] args) { + var apiClient = Configuration.getDefaultApiClient() + .setApiKey("YOUR_API_KEY"); + + var faxApi = new FaxApi(apiClient); + + var faxId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; + + try { + FaxGetResponse result = faxApi.faxGet(faxId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} + +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| + **faxId** | **String**| Fax ID | + +### Return type + +[**FaxGetResponse**](FaxGetResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + + +## faxList + +> FaxListResponse faxList(page, pageSize) + +Lists Faxes + +Returns properties of multiple faxes + +### Example + +```java +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.model.*; + +public class Example { + public static void main(String[] args) { + var apiClient = Configuration.getDefaultApiClient() + .setApiKey("YOUR_API_KEY"); + + var faxApi = new FaxApi(apiClient); + + var page = 1; + var pageSize = 2; + + try { + FaxListResponse result = faxApi.faxList(page, pageSize); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} + +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| + **page** | **Integer**| Page | [optional] [default to 1] + **pageSize** | **Integer**| Page size | [optional] [default to 20] + +### Return type + +[**FaxListResponse**](FaxListResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + + +## faxSend + +> FaxGetResponse faxSend(faxSendRequest) + +Send Fax + +Action to prepare and send a fax + +### Example + +```java +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.model.*; + +import java.util.List; + +public class Example { + public static void main(String[] args) { + var apiClient = Configuration.getDefaultApiClient() + .setApiKey("YOUR_API_KEY"); + + var faxApi = new FaxApi(apiClient); + + + var data = new FaxSendRequest() + .addFilesItem(new File("example_fax.pdf")) + .testMode(true) + .recipient("16690000001") + .sender("16690000000") + .coverPageTo("Jill Fax") + .coverPageMessage("I'm sending you a fax!") + .coverPageFrom("Faxer Faxerson") + .title("This is what the fax is about!"); + + try { + FaxCreateResponse result = faxApi.faxSend(data); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} + +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| + **faxSendRequest** | [**FaxSendRequest**](FaxSendRequest.md)| | + +### Return type + +[**FaxGetResponse**](FaxGetResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: application/json, multipart/form-data +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + diff --git a/docs/FaxGetResponse.md b/docs/FaxGetResponse.md new file mode 100644 index 0000000..cc9dc6e --- /dev/null +++ b/docs/FaxGetResponse.md @@ -0,0 +1,15 @@ + + +# FaxGetResponse + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `fax`*_required_ | [```FaxResponse```](FaxResponse.md) | | | +| `warnings` | [```List```](WarningResponse.md) | A list of warnings. | | + + + diff --git a/docs/FaxListResponse.md b/docs/FaxListResponse.md new file mode 100644 index 0000000..f25379a --- /dev/null +++ b/docs/FaxListResponse.md @@ -0,0 +1,15 @@ + + +# FaxListResponse + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `faxes`*_required_ | [```List```](FaxResponse.md) | | | +| `listInfo`*_required_ | [```ListInfoResponse```](ListInfoResponse.md) | | | + + + diff --git a/docs/FaxResponse.md b/docs/FaxResponse.md new file mode 100644 index 0000000..77ec7eb --- /dev/null +++ b/docs/FaxResponse.md @@ -0,0 +1,23 @@ + + +# FaxResponse + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `faxId`*_required_ | ```String``` | Fax ID | | +| `title`*_required_ | ```String``` | Fax Title | | +| `originalTitle`*_required_ | ```String``` | Fax Original Title | | +| `subject`*_required_ | ```String``` | Fax Subject | | +| `message`*_required_ | ```String``` | Fax Message | | +| `metadata`*_required_ | ```Map``` | Fax Metadata | | +| `createdAt`*_required_ | ```Integer``` | Fax Created At Timestamp | | +| `sender`*_required_ | ```String``` | Fax Sender Email | | +| `transmissions`*_required_ | [```List```](FaxResponseTransmission.md) | Fax Transmissions List | | +| `filesUrl`*_required_ | ```String``` | Fax Files URL | | + + + diff --git a/docs/FaxResponseTransmission.md b/docs/FaxResponseTransmission.md new file mode 100644 index 0000000..09db223 --- /dev/null +++ b/docs/FaxResponseTransmission.md @@ -0,0 +1,32 @@ + + +# FaxResponseTransmission + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `recipient`*_required_ | ```String``` | Fax Transmission Recipient | | +| `sender`*_required_ | ```String``` | Fax Transmission Sender | | +| `statusCode`*_required_ | [```StatusCodeEnum```](#StatusCodeEnum) | Fax Transmission Status Code | | +| `sentAt` | ```Integer``` | Fax Transmission Sent Timestamp | | + + + +## Enum: StatusCodeEnum + +| Name | Value | +---- | ----- +| SUCCESS | "success" | +| TRANSMITTING | "transmitting" | +| ERROR_COULD_NOT_FAX | "error_could_not_fax" | +| ERROR_UNKNOWN | "error_unknown" | +| ERROR_BUSY | "error_busy" | +| ERROR_NO_ANSWER | "error_no_answer" | +| ERROR_DISCONNECTED | "error_disconnected" | +| ERROR_BAD_DESTINATION | "error_bad_destination" | + + + diff --git a/docs/FaxSendRequest.md b/docs/FaxSendRequest.md new file mode 100644 index 0000000..5b939a0 --- /dev/null +++ b/docs/FaxSendRequest.md @@ -0,0 +1,22 @@ + + +# FaxSendRequest + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `recipient`*_required_ | ```String``` | Fax Send To Recipient | | +| `sender` | ```String``` | Fax Send From Sender (used only with fax number) | | +| `files` | ```List``` | Fax File to Send | | +| `fileUrls` | ```List``` | Fax File URL to Send | | +| `testMode` | ```Boolean``` | API Test Mode Setting | | +| `coverPageTo` | ```String``` | Fax Cover Page for Recipient | | +| `coverPageFrom` | ```String``` | Fax Cover Page for Sender | | +| `coverPageMessage` | ```String``` | Fax Cover Page Message | | +| `title` | ```String``` | Fax Title | | + + + diff --git a/docs/OAuthApi.md b/docs/OAuthApi.md index 533052b..a2eaa25 100644 --- a/docs/OAuthApi.md +++ b/docs/OAuthApi.md @@ -77,6 +77,7 @@ No authorization required | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | ## oauthTokenRefresh @@ -144,4 +145,5 @@ No authorization required | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | diff --git a/docs/OAuthTokenRefreshRequest.md b/docs/OAuthTokenRefreshRequest.md index 2b985fa..f0ce430 100644 --- a/docs/OAuthTokenRefreshRequest.md +++ b/docs/OAuthTokenRefreshRequest.md @@ -10,6 +10,8 @@ |------------ | ------------- | ------------- | -------------| | `grantType`*_required_ | ```String``` | When refreshing an existing token use `refresh_token`. | | | `refreshToken`*_required_ | ```String``` | The token provided when you got the expired access token. | | +| `clientId` | ```String``` | The client ID for your API app. Mandatory from August 1st, 2025. Until then, required if the "Client Credentials Required" setting is enabled for token refresh; optional if disabled. | | +| `clientSecret` | ```String``` | The client secret for your API app. Mandatory from August 1st, 2025. Until then, required if the "Client Credentials Required" setting is enabled for token refresh; optional if disabled. | | diff --git a/docs/SignatureRequestApi.md b/docs/SignatureRequestApi.md index ee42461..60e0242 100644 --- a/docs/SignatureRequestApi.md +++ b/docs/SignatureRequestApi.md @@ -265,7 +265,7 @@ Cancels an incomplete signature request. This action is **not reversible**. The request will be canceled and signers will no longer be able to sign. If they try to access the signature request they will receive a HTTP 410 status code indicating that the resource has been deleted. Cancelation is asynchronous and a successful call to this endpoint will return an empty 200 OK response if the signature request is eligible to be canceled and has been successfully queued. -This 200 OK response does not indicate a successful cancelation of the signature request itself. The cancelation is confirmed via the `signature_request_canceled` event. It is recommended that a [callback handler](/api/reference/tag/Callbacks-and-Events) be implemented to listen for the `signature_request_canceled` event. This callback will be sent only when the cancelation has completed successfully. If a callback handler has been configured and the event has not been received within 60 minutes of making the call, check the status of the request in the [API Dashboard](https://app.hellosign.com/apidashboard) and retry the cancelation if necessary. +This 200 OK response does not indicate a successful cancelation of the signature request itself. The cancelation is confirmed via the `signature_request_canceled` event. It is recommended that a [callback handler](/api/reference/tag/Callbacks-and-Events) be implemented to listen for the `signature_request_canceled` event. This callback will be sent only when the cancelation has completed successfully. If a callback handler has been configured and the event has not been received within 60 minutes of making the call, check the status of the request in the [API Dashboard](https://app.hellosign.com/apidashboard) and retry the cancelation if necessary. To be eligible for cancelation, a signature request must have been sent successfully, must not yet have been signed by all signers, and you must either be the sender or own the API app under which it was sent. A partially signed signature request can be canceled. diff --git a/docs/TemplateApi.md b/docs/TemplateApi.md index a3394d6..e6c7d17 100644 --- a/docs/TemplateApi.md +++ b/docs/TemplateApi.md @@ -5,7 +5,7 @@ All URIs are relative to *https://api.hellosign.com/v3* | Method | HTTP request | Description | |------------- | ------------- | -------------| [**templateAddUser**](TemplateApi.md#templateAddUser) | **POST** /template/add_user/{template_id} | Add User to Template -[**templateCreate**](TemplateApi.md#templateCreate) | **POST** /template/create | Create Template +[**templateCreate**](TemplateApi.md#templateCreate) | **POST** /template/create | Create Template [**templateCreateEmbeddedDraft**](TemplateApi.md#templateCreateEmbeddedDraft) | **POST** /template/create_embedded_draft | Create Embedded Template Draft [**templateDelete**](TemplateApi.md#templateDelete) | **POST** /template/delete/{template_id} | Delete Template [**templateFiles**](TemplateApi.md#templateFiles) | **GET** /template/files/{template_id} | Get Template Files @@ -100,7 +100,7 @@ public class Example { > TemplateCreateResponse templateCreate(templateCreateRequest) -Create Template +Create Template Creates a template that can then be used. diff --git a/docs/TemplateResponse.md b/docs/TemplateResponse.md index 078685f..27673e3 100644 --- a/docs/TemplateResponse.md +++ b/docs/TemplateResponse.md @@ -12,7 +12,7 @@ Contains information about the templates you and your team have created. | `title` | ```String``` | The title of the Template. This will also be the default subject of the message sent to signers when using this Template to send a SignatureRequest. This can be overridden when sending the SignatureRequest. | | | `message` | ```String``` | The default message that will be sent to signers when using this Template to send a SignatureRequest. This can be overridden when sending the SignatureRequest. | | | `updatedAt` | ```Integer``` | Time the template was last updated. | | -| `isEmbedded` | ```Boolean``` | `true` if this template was created using an embedded flow, `false` if it was created on our website. | | +| `isEmbedded` | ```Boolean``` | `true` if this template was created using an embedded flow, `false` if it was created on our website. Will be `null` when you are not the creator of the Template. | | | `isCreator` | ```Boolean``` | `true` if you are the owner of this template, `false` if it's been shared with you by a team member. | | | `canEdit` | ```Boolean``` | Indicates whether edit rights have been granted to you by the owner (always `true` if that's you). | | | `isLocked` | ```Boolean``` | Indicates whether the template is locked. If `true`, then the template was created outside your quota and can only be used in `test_mode`. If `false`, then the template is within your quota and can be used to create signature requests. | | @@ -23,6 +23,7 @@ Contains information about the templates you and your team have created. | `customFields` | [```List```](TemplateResponseDocumentCustomFieldBase.md) | Deprecated. Use `custom_fields` inside the [documents](https://developers.hellosign.com/api/reference/operation/templateGet/#!c=200&path=template/documents&t=response) array instead. | | | `namedFormFields` | [```List```](TemplateResponseDocumentFormFieldBase.md) | Deprecated. Use `form_fields` inside the [documents](https://developers.hellosign.com/api/reference/operation/templateGet/#!c=200&path=template/documents&t=response) array instead. | | | `accounts` | [```List```](TemplateResponseAccount.md) | An array of the Accounts that can use this Template. | | +| `attachments` | [```List```](SignatureRequestResponseAttachment.md) | Signer attachments. | | diff --git a/docs/TemplateResponseDocumentFormFieldBase.md b/docs/TemplateResponseDocumentFormFieldBase.md index 656070a..6ff8960 100644 --- a/docs/TemplateResponseDocumentFormFieldBase.md +++ b/docs/TemplateResponseDocumentFormFieldBase.md @@ -17,7 +17,6 @@ An array of Form Field objects containing the name and type of each named field. | `width` | ```Integer``` | The width in pixels of this form field. | | | `height` | ```Integer``` | The height in pixels of this form field. | | | `required` | ```Boolean``` | Boolean showing whether or not this field is required. | | -| `group` | ```String``` | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | | diff --git a/docs/TemplateResponseDocumentFormFieldCheckbox.md b/docs/TemplateResponseDocumentFormFieldCheckbox.md index 83d36e0..a7f2cad 100644 --- a/docs/TemplateResponseDocumentFormFieldCheckbox.md +++ b/docs/TemplateResponseDocumentFormFieldCheckbox.md @@ -9,6 +9,7 @@ This class extends `TemplateResponseDocumentFormFieldBase` | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | `type`*_required_ | ```String``` | The type of this form field. See [field types](/api/reference/constants/#field-types).

* Text Field uses `TemplateResponseDocumentFormFieldText`
* Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown`
* Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink`
* Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox`
* Radio Field uses `TemplateResponseDocumentFormFieldRadio`
* Signature Field uses `TemplateResponseDocumentFormFieldSignature`
* Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned`
* Initials Field uses `TemplateResponseDocumentFormFieldInitials` | | +| `group` | ```String``` | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | | diff --git a/docs/TemplateResponseDocumentFormFieldDateSigned.md b/docs/TemplateResponseDocumentFormFieldDateSigned.md index 5ba66ef..09b45ee 100644 --- a/docs/TemplateResponseDocumentFormFieldDateSigned.md +++ b/docs/TemplateResponseDocumentFormFieldDateSigned.md @@ -9,6 +9,7 @@ This class extends `TemplateResponseDocumentFormFieldBase` | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | `type`*_required_ | ```String``` | The type of this form field. See [field types](/api/reference/constants/#field-types).

* Text Field uses `TemplateResponseDocumentFormFieldText`
* Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown`
* Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink`
* Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox`
* Radio Field uses `TemplateResponseDocumentFormFieldRadio`
* Signature Field uses `TemplateResponseDocumentFormFieldSignature`
* Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned`
* Initials Field uses `TemplateResponseDocumentFormFieldInitials` | | +| `group` | ```String``` | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | | diff --git a/docs/TemplateResponseDocumentFormFieldDropdown.md b/docs/TemplateResponseDocumentFormFieldDropdown.md index b4f2030..70e5da4 100644 --- a/docs/TemplateResponseDocumentFormFieldDropdown.md +++ b/docs/TemplateResponseDocumentFormFieldDropdown.md @@ -9,6 +9,7 @@ This class extends `TemplateResponseDocumentFormFieldBase` | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | `type`*_required_ | ```String``` | The type of this form field. See [field types](/api/reference/constants/#field-types).

* Text Field uses `TemplateResponseDocumentFormFieldText`
* Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown`
* Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink`
* Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox`
* Radio Field uses `TemplateResponseDocumentFormFieldRadio`
* Signature Field uses `TemplateResponseDocumentFormFieldSignature`
* Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned`
* Initials Field uses `TemplateResponseDocumentFormFieldInitials` | | +| `group` | ```String``` | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | | diff --git a/docs/TemplateResponseDocumentFormFieldHyperlink.md b/docs/TemplateResponseDocumentFormFieldHyperlink.md index 0cf89df..e8efcf2 100644 --- a/docs/TemplateResponseDocumentFormFieldHyperlink.md +++ b/docs/TemplateResponseDocumentFormFieldHyperlink.md @@ -13,6 +13,7 @@ This class extends `TemplateResponseDocumentFormFieldBase` | `isMultiline` | ```Boolean``` | Whether this form field is multiline text. | | | `originalFontSize` | ```Integer``` | Original font size used in this form field's text. | | | `fontFamily` | ```String``` | Font family used in this form field's text. | | +| `group` | ```String``` | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | | diff --git a/docs/TemplateResponseDocumentFormFieldInitials.md b/docs/TemplateResponseDocumentFormFieldInitials.md index 707d67e..f1fe1f5 100644 --- a/docs/TemplateResponseDocumentFormFieldInitials.md +++ b/docs/TemplateResponseDocumentFormFieldInitials.md @@ -9,6 +9,7 @@ This class extends `TemplateResponseDocumentFormFieldBase` | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | `type`*_required_ | ```String``` | The type of this form field. See [field types](/api/reference/constants/#field-types).

* Text Field uses `TemplateResponseDocumentFormFieldText`
* Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown`
* Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink`
* Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox`
* Radio Field uses `TemplateResponseDocumentFormFieldRadio`
* Signature Field uses `TemplateResponseDocumentFormFieldSignature`
* Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned`
* Initials Field uses `TemplateResponseDocumentFormFieldInitials` | | +| `group` | ```String``` | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | | diff --git a/docs/TemplateResponseDocumentFormFieldRadio.md b/docs/TemplateResponseDocumentFormFieldRadio.md index b83d96d..877b842 100644 --- a/docs/TemplateResponseDocumentFormFieldRadio.md +++ b/docs/TemplateResponseDocumentFormFieldRadio.md @@ -9,6 +9,7 @@ This class extends `TemplateResponseDocumentFormFieldBase` | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | `type`*_required_ | ```String``` | The type of this form field. See [field types](/api/reference/constants/#field-types).

* Text Field uses `TemplateResponseDocumentFormFieldText`
* Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown`
* Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink`
* Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox`
* Radio Field uses `TemplateResponseDocumentFormFieldRadio`
* Signature Field uses `TemplateResponseDocumentFormFieldSignature`
* Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned`
* Initials Field uses `TemplateResponseDocumentFormFieldInitials` | | +| `group`*_required_ | ```String``` | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | | diff --git a/docs/TemplateResponseDocumentFormFieldSignature.md b/docs/TemplateResponseDocumentFormFieldSignature.md index 8be2987..366aaa9 100644 --- a/docs/TemplateResponseDocumentFormFieldSignature.md +++ b/docs/TemplateResponseDocumentFormFieldSignature.md @@ -9,6 +9,7 @@ This class extends `TemplateResponseDocumentFormFieldBase` | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | `type`*_required_ | ```String``` | The type of this form field. See [field types](/api/reference/constants/#field-types).

* Text Field uses `TemplateResponseDocumentFormFieldText`
* Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown`
* Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink`
* Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox`
* Radio Field uses `TemplateResponseDocumentFormFieldRadio`
* Signature Field uses `TemplateResponseDocumentFormFieldSignature`
* Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned`
* Initials Field uses `TemplateResponseDocumentFormFieldInitials` | | +| `group` | ```String``` | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | | diff --git a/docs/TemplateResponseDocumentFormFieldText.md b/docs/TemplateResponseDocumentFormFieldText.md index 3581d38..49cdfaa 100644 --- a/docs/TemplateResponseDocumentFormFieldText.md +++ b/docs/TemplateResponseDocumentFormFieldText.md @@ -14,6 +14,7 @@ This class extends `TemplateResponseDocumentFormFieldBase` | `originalFontSize` | ```Integer``` | Original font size used in this form field's text. | | | `fontFamily` | ```String``` | Font family used in this form field's text. | | | `validationType` | [```ValidationTypeEnum```](#ValidationTypeEnum) | Each text field may contain a `validation_type` parameter. Check out the list of [validation types](https://faq.hellosign.com/hc/en-us/articles/217115577) to learn more about the possible values. | | +| `group` | ```String``` | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | | diff --git a/examples/FaxDelete.java b/examples/FaxDelete.java new file mode 100644 index 0000000..794b74d --- /dev/null +++ b/examples/FaxDelete.java @@ -0,0 +1,25 @@ +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.model.*; + +import java.util.List; + +public class Example { + public static void main(String[] args) { + var apiClient = Configuration.getDefaultApiClient() + .setApiKey("YOUR_API_KEY"); + + var faxApi = new FaxApi(apiClient); + + try { + faxApi.faxDelete("fa5c8a0b0f492d768749333ad6fcc214c111e967"); + } catch (ApiException e) { + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/FaxFiles.java b/examples/FaxFiles.java new file mode 100644 index 0000000..bd6dcc5 --- /dev/null +++ b/examples/FaxFiles.java @@ -0,0 +1,28 @@ +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.model.*; + +import java.io.File; + +public class Example { + public static void main(String[] args) { + var apiClient = Configuration.getDefaultApiClient() + .setApiKey("YOUR_API_KEY"); + + var faxApi = new FaxApi(apiClient); + + var faxId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; + + try { + File result = faxApi.faxFiles(faxId); + result.renameTo(new File("file_response.pdf"));; + } catch (ApiException e) { + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/FaxGet.java b/examples/FaxGet.java new file mode 100644 index 0000000..a9cc433 --- /dev/null +++ b/examples/FaxGet.java @@ -0,0 +1,27 @@ +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.model.*; + +public class Example { + public static void main(String[] args) { + var apiClient = Configuration.getDefaultApiClient() + .setApiKey("YOUR_API_KEY"); + + var faxApi = new FaxApi(apiClient); + + var faxId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"; + + try { + FaxGetResponse result = faxApi.faxGet(faxId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/FaxList.java b/examples/FaxList.java new file mode 100644 index 0000000..042bb71 --- /dev/null +++ b/examples/FaxList.java @@ -0,0 +1,28 @@ +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.model.*; + +public class Example { + public static void main(String[] args) { + var apiClient = Configuration.getDefaultApiClient() + .setApiKey("YOUR_API_KEY"); + + var faxApi = new FaxApi(apiClient); + + var page = 1; + var pageSize = 2; + + try { + FaxListResponse result = faxApi.faxList(page, pageSize); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AccountApi#accountCreate"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/FaxSend.java b/examples/FaxSend.java new file mode 100644 index 0000000..4e764da --- /dev/null +++ b/examples/FaxSend.java @@ -0,0 +1,37 @@ +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.model.*; + +import java.util.List; + +public class Example { + public static void main(String[] args) { + var apiClient = Configuration.getDefaultApiClient() + .setApiKey("YOUR_API_KEY"); + + var faxApi = new FaxApi(apiClient); + + + var data = new FaxSendRequest() + .addFilesItem(new File("example_fax.pdf")) + .testMode(true) + .recipient("16690000001") + .sender("16690000000") + .coverPageTo("Jill Fax") + .coverPageMessage("I'm sending you a fax!") + .coverPageFrom("Faxer Faxerson") + .title("This is what the fax is about!"); + + try { + FaxCreateResponse result = faxApi.faxSend(data); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/gradle.properties b/gradle.properties index 16b83ff..a2e3dde 100644 --- a/gradle.properties +++ b/gradle.properties @@ -6,7 +6,7 @@ #target = android GROUP=com.dropbox.sign POM_ARTIFACT_ID=dropbox-sign -VERSION_NAME=1.6.1 +VERSION_NAME=1.7.0 POM_NAME=Dropbox Sign Java SDK POM_DESCRIPTION=Use the Dropbox Sign Java SDK to connect your Java app to the service of Dropbox Sign in microseconds! diff --git a/openapi-config.yaml b/openapi-config.yaml index 8439e41..cf6fb4a 100644 --- a/openapi-config.yaml +++ b/openapi-config.yaml @@ -16,7 +16,7 @@ additionalProperties: groupId: com.dropbox.sign artifactId: dropbox-sign artifactName: Dropbox Sign Java SDK - artifactVersion: "1.6.1" + artifactVersion: "1.7.0" artifactUrl: https://github.com/hellosign/dropbox-sign-java artifactDescription: Use the Dropbox Sign Java SDK to connect your Java app to the service of Dropbox Sign in microseconds! scmConnection: scm:git:git://github.com/hellosign/dropbox-sign-java.git diff --git a/openapi-sdk.yaml b/openapi-sdk.yaml index c7189fd..fe81aca 100644 --- a/openapi-sdk.yaml +++ b/openapi-sdk.yaml @@ -1409,6 +1409,304 @@ paths: seo: title: 'Get Embedded Sign URL | iFrame | Dropbox Sign for Developers' description: 'The Dropbox Sign API allows you to build custom integrations. To find out how to retrieve an embedded iFrame object containing a signature url, click here.' + '/fax/{fax_id}': + get: + tags: + - Fax + summary: 'Get Fax' + description: 'Returns information about fax' + operationId: faxGet + parameters: + - + name: fax_id + in: path + description: 'Fax ID' + required: true + schema: + type: string + example: fa5c8a0b0f492d768749333ad6fcc214c111e967 + responses: + 200: + description: 'successful operation' + headers: + X-RateLimit-Limit: + $ref: '#/components/headers/X-RateLimit-Limit' + X-RateLimit-Remaining: + $ref: '#/components/headers/X-RateLimit-Remaining' + X-Ratelimit-Reset: + $ref: '#/components/headers/X-Ratelimit-Reset' + content: + application/json: + schema: + $ref: '#/components/schemas/FaxGetResponse' + examples: + default_example: + $ref: '#/components/examples/FaxGetResponseExample' + 4XX: + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400ResponseExample' + 401_example: + $ref: '#/components/examples/Error401ResponseExample' + 402_example: + $ref: '#/components/examples/Error402ResponseExample' + 403_example: + $ref: '#/components/examples/Error403ResponseExample' + 404_example: + $ref: '#/components/examples/Error404ResponseExample' + 429_example: + $ref: '#/components/examples/Error429ResponseExample' + 4XX_example: + $ref: '#/components/examples/Error4XXResponseExample' + security: + - + api_key: [] + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/FaxGet.php + - + lang: 'C#' + label: 'C#' + source: + $ref: examples/FaxGet.cs + - + lang: JavaScript + label: JavaScript + source: + $ref: examples/FaxGet.js + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/FaxGet.ts + - + lang: Java + label: Java + source: + $ref: examples/FaxGet.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/FaxGet.rb + - + lang: Python + label: Python + source: + $ref: examples/FaxGet.py + - + lang: cURL + label: cURL + source: + $ref: examples/FaxGet.sh + x-meta: + seo: + title: 'Get Fax | API Documentation | Dropbox Fax for Developers' + description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to retrieve a fax, click here.' + delete: + tags: + - Fax + summary: 'Delete Fax' + description: 'Deletes the specified Fax from the system.' + operationId: faxDelete + parameters: + - + name: fax_id + in: path + description: 'Fax ID' + required: true + schema: + type: string + example: fa5c8a0b0f492d768749333ad6fcc214c111e967 + responses: + 204: + description: 'successful operation' + headers: + X-RateLimit-Limit: + $ref: '#/components/headers/X-RateLimit-Limit' + X-RateLimit-Remaining: + $ref: '#/components/headers/X-RateLimit-Remaining' + X-Ratelimit-Reset: + $ref: '#/components/headers/X-Ratelimit-Reset' + 4XX: + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400ResponseExample' + 401_example: + $ref: '#/components/examples/Error401ResponseExample' + 402_example: + $ref: '#/components/examples/Error402ResponseExample' + 403_example: + $ref: '#/components/examples/Error403ResponseExample' + 404_example: + $ref: '#/components/examples/Error404ResponseExample' + 429_example: + $ref: '#/components/examples/Error429ResponseExample' + 4XX_example: + $ref: '#/components/examples/Error4XXResponseExample' + security: + - + api_key: [] + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/FaxDelete.php + - + lang: 'C#' + label: 'C#' + source: + $ref: examples/FaxDelete.cs + - + lang: JavaScript + label: JavaScript + source: + $ref: examples/FaxDelete.js + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/FaxDelete.ts + - + lang: Java + label: Java + source: + $ref: examples/FaxDelete.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/FaxDelete.rb + - + lang: Python + label: Python + source: + $ref: examples/FaxDelete.py + - + lang: cURL + label: cURL + source: + $ref: examples/FaxDelete.sh + x-meta: + seo: + title: 'Delete Fax | API Documentation | Dropbox Fax for Developers' + description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to delete a fax, click here.' + '/fax/files/{fax_id}': + get: + tags: + - Fax + summary: 'List Fax Files' + description: 'Returns list of fax files' + operationId: faxFiles + parameters: + - + name: fax_id + in: path + description: 'Fax ID' + required: true + schema: + type: string + example: fa5c8a0b0f492d768749333ad6fcc214c111e967 + responses: + 200: + description: 'successful operation' + headers: + X-RateLimit-Limit: + $ref: '#/components/headers/X-RateLimit-Limit' + X-RateLimit-Remaining: + $ref: '#/components/headers/X-RateLimit-Remaining' + X-Ratelimit-Reset: + $ref: '#/components/headers/X-Ratelimit-Reset' + content: + application/pdf: + schema: + type: string + format: binary + 4XX: + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400ResponseExample' + 401_example: + $ref: '#/components/examples/Error401ResponseExample' + 402_example: + $ref: '#/components/examples/Error402ResponseExample' + 403_example: + $ref: '#/components/examples/Error403ResponseExample' + 404_example: + $ref: '#/components/examples/Error404ResponseExample' + 410_example: + $ref: '#/components/examples/Error410ResponseExample' + 429_example: + $ref: '#/components/examples/Error429ResponseExample' + 4XX_example: + $ref: '#/components/examples/Error4XXResponseExample' + security: + - + api_key: [] + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/FaxFiles.php + - + lang: 'C#' + label: 'C#' + source: + $ref: examples/FaxFiles.cs + - + lang: JavaScript + label: JavaScript + source: + $ref: examples/FaxFiles.js + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/FaxFiles.ts + - + lang: Java + label: Java + source: + $ref: examples/FaxFiles.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/FaxFiles.rb + - + lang: Python + label: Python + source: + $ref: examples/FaxFiles.py + - + lang: cURL + label: cURL + source: + $ref: examples/FaxFiles.sh + x-meta: + seo: + title: 'Fax Files | API Documentation | Dropbox Fax for Developers' + description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to list fax files, click here.' /fax_line/add_user: put: tags: @@ -1977,31 +2275,243 @@ paths: lang: Python label: Python source: - $ref: examples/FaxLineDelete.py + $ref: examples/FaxLineDelete.py + - + lang: cURL + label: cURL + source: + $ref: examples/FaxLineDelete.sh + x-meta: + seo: + title: 'Delete Fax Line | API Documentation | Dropbox Fax for Developers' + description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to delete a fax line, click here.' + /fax_line/list: + get: + tags: + - 'Fax Line' + summary: 'List Fax Lines' + description: 'Returns the properties and settings of multiple Fax Lines.' + operationId: faxLineList + parameters: + - + name: account_id + in: query + description: 'Account ID' + schema: + type: string + example: ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97 + - + name: page + in: query + description: Page + schema: + type: integer + default: 1 + example: 1 + - + name: page_size + in: query + description: 'Page size' + schema: + type: integer + default: 20 + example: 20 + - + name: show_team_lines + in: query + description: 'Show team lines' + schema: + type: boolean + responses: + 200: + description: 'successful operation' + headers: + X-RateLimit-Limit: + $ref: '#/components/headers/X-RateLimit-Limit' + X-RateLimit-Remaining: + $ref: '#/components/headers/X-RateLimit-Remaining' + X-Ratelimit-Reset: + $ref: '#/components/headers/X-Ratelimit-Reset' + content: + application/json: + schema: + $ref: '#/components/schemas/FaxLineListResponse' + examples: + default_example: + $ref: '#/components/examples/FaxLineListResponseExample' + 4XX: + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400ResponseExample' + 401_example: + $ref: '#/components/examples/Error401ResponseExample' + 402_example: + $ref: '#/components/examples/Error402ResponseExample' + 403_example: + $ref: '#/components/examples/Error403ResponseExample' + 4XX_example: + $ref: '#/components/examples/Error4XXResponseExample' + security: + - + api_key: [] + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/FaxLineList.php + - + lang: 'C#' + label: 'C#' + source: + $ref: examples/FaxLineList.cs + - + lang: JavaScript + label: JavaScript + source: + $ref: examples/FaxLineList.js + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/FaxLineList.ts + - + lang: Java + label: Java + source: + $ref: examples/FaxLineList.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/FaxLineList.rb + - + lang: Python + label: Python + source: + $ref: examples/FaxLineList.py + - + lang: cURL + label: cURL + source: + $ref: examples/FaxLineList.sh + x-meta: + seo: + title: 'List Fax Lines | API Documentation | Dropbox Fax for Developers' + description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to list your fax lines, click here.' + /fax_line/remove_user: + put: + tags: + - 'Fax Line' + summary: 'Remove Fax Line Access' + description: 'Removes a user''s access to the specified Fax Line.' + operationId: faxLineRemoveUser + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/FaxLineRemoveUserRequest' + examples: + default_example: + $ref: '#/components/examples/FaxLineRemoveUserRequestExample' + responses: + 200: + description: 'successful operation' + headers: + X-RateLimit-Limit: + $ref: '#/components/headers/X-RateLimit-Limit' + X-RateLimit-Remaining: + $ref: '#/components/headers/X-RateLimit-Remaining' + X-Ratelimit-Reset: + $ref: '#/components/headers/X-Ratelimit-Reset' + content: + application/json: + schema: + $ref: '#/components/schemas/FaxLineResponse' + examples: + default_example: + $ref: '#/components/examples/FaxLineResponseExample' + 4XX: + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400ResponseExample' + 401_example: + $ref: '#/components/examples/Error401ResponseExample' + 402_example: + $ref: '#/components/examples/Error402ResponseExample' + 403_example: + $ref: '#/components/examples/Error403ResponseExample' + 404_example: + $ref: '#/components/examples/Error404ResponseExample' + 4XX_example: + $ref: '#/components/examples/Error4XXResponseExample' + security: + - + api_key: [] + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/FaxLineRemoveUser.php + - + lang: 'C#' + label: 'C#' + source: + $ref: examples/FaxLineRemoveUser.cs + - + lang: JavaScript + label: JavaScript + source: + $ref: examples/FaxLineRemoveUser.js + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/FaxLineRemoveUser.ts + - + lang: Java + label: Java + source: + $ref: examples/FaxLineRemoveUser.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/FaxLineRemoveUser.rb + - + lang: Python + label: Python + source: + $ref: examples/FaxLineRemoveUser.py - lang: cURL label: cURL source: - $ref: examples/FaxLineDelete.sh + $ref: examples/FaxLineRemoveUser.sh x-meta: seo: - title: 'Delete Fax Line | API Documentation | Dropbox Fax for Developers' - description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to delete a fax line, click here.' - /fax_line/list: + title: 'Fax Line Remove User | API Documentation | Dropbox Fax for Developers' + description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to remove a user from an existing fax line, click here.' + /fax/list: get: tags: - - 'Fax Line' - summary: 'List Fax Lines' - description: 'Returns the properties and settings of multiple Fax Lines.' - operationId: faxLineList + - Fax + summary: 'Lists Faxes' + description: 'Returns properties of multiple faxes' + operationId: faxList parameters: - - - name: account_id - in: query - description: 'Account ID' - schema: - type: string - example: ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97 - name: page in: query @@ -2009,6 +2519,7 @@ paths: schema: type: integer default: 1 + minimum: 1 example: 1 - name: page_size @@ -2017,13 +2528,9 @@ paths: schema: type: integer default: 20 + maximum: 100 + minimum: 1 example: 20 - - - name: show_team_lines - in: query - description: 'Show team lines' - schema: - type: boolean responses: 200: description: 'successful operation' @@ -2037,10 +2544,10 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/FaxLineListResponse' + $ref: '#/components/schemas/FaxListResponse' examples: default_example: - $ref: '#/components/examples/FaxLineListResponseExample' + $ref: '#/components/examples/FaxListResponseExample' 4XX: description: failed_operation content: @@ -2066,62 +2573,65 @@ paths: lang: PHP label: PHP source: - $ref: examples/FaxLineList.php + $ref: examples/FaxList.php - lang: 'C#' label: 'C#' source: - $ref: examples/FaxLineList.cs + $ref: examples/FaxList.cs - lang: JavaScript label: JavaScript source: - $ref: examples/FaxLineList.js + $ref: examples/FaxList.js - lang: TypeScript label: TypeScript source: - $ref: examples/FaxLineList.ts + $ref: examples/FaxList.ts - lang: Java label: Java source: - $ref: examples/FaxLineList.java + $ref: examples/FaxList.java - lang: Ruby label: Ruby source: - $ref: examples/FaxLineList.rb + $ref: examples/FaxList.rb - lang: Python label: Python source: - $ref: examples/FaxLineList.py + $ref: examples/FaxList.py - lang: cURL label: cURL source: - $ref: examples/FaxLineList.sh + $ref: examples/FaxList.sh x-meta: seo: - title: 'List Fax Lines | API Documentation | Dropbox Fax for Developers' - description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to list your fax lines, click here.' - /fax_line/remove_user: - put: + title: 'List Faxes | API Documentation | Dropbox Fax for Developers' + description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to list your faxes, click here.' + /fax/send: + post: tags: - - 'Fax Line' - summary: 'Remove Fax Line Access' - description: 'Removes a user''s access to the specified Fax Line.' - operationId: faxLineRemoveUser + - Fax + summary: 'Send Fax' + description: 'Action to prepare and send a fax' + operationId: faxSend requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/FaxLineRemoveUserRequest' + $ref: '#/components/schemas/FaxSendRequest' examples: default_example: - $ref: '#/components/examples/FaxLineRemoveUserRequestExample' + $ref: '#/components/examples/FaxSendRequestExample' + multipart/form-data: + schema: + $ref: '#/components/schemas/FaxSendRequest' responses: 200: description: 'successful operation' @@ -2135,10 +2645,10 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/FaxLineResponse' + $ref: '#/components/schemas/FaxGetResponse' examples: default_example: - $ref: '#/components/examples/FaxLineResponseExample' + $ref: '#/components/examples/FaxGetResponseExample' 4XX: description: failed_operation content: @@ -2156,6 +2666,8 @@ paths: $ref: '#/components/examples/Error403ResponseExample' 404_example: $ref: '#/components/examples/Error404ResponseExample' + 429_example: + $ref: '#/components/examples/Error429ResponseExample' 4XX_example: $ref: '#/components/examples/Error4XXResponseExample' security: @@ -2166,46 +2678,46 @@ paths: lang: PHP label: PHP source: - $ref: examples/FaxLineRemoveUser.php + $ref: examples/FaxSend.php - lang: 'C#' label: 'C#' source: - $ref: examples/FaxLineRemoveUser.cs + $ref: examples/FaxSend.cs - lang: JavaScript label: JavaScript source: - $ref: examples/FaxLineRemoveUser.js + $ref: examples/FaxSend.js - lang: TypeScript label: TypeScript source: - $ref: examples/FaxLineRemoveUser.ts + $ref: examples/FaxSend.ts - lang: Java label: Java source: - $ref: examples/FaxLineRemoveUser.java + $ref: examples/FaxSend.java - lang: Ruby label: Ruby source: - $ref: examples/FaxLineRemoveUser.rb + $ref: examples/FaxSend.rb - lang: Python label: Python source: - $ref: examples/FaxLineRemoveUser.py + $ref: examples/FaxSend.py - lang: cURL label: cURL source: - $ref: examples/FaxLineRemoveUser.sh + $ref: examples/FaxSend.sh x-meta: seo: - title: 'Fax Line Remove User | API Documentation | Dropbox Fax for Developers' - description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to remove a user from an existing fax line, click here.' + title: 'Send Fax| API Documentation | Dropbox Fax for Developers' + description: 'The Dropbox Fax API allows you to build custom integrations. To find out how to send a fax, click here.' /oauth/token: post: tags: @@ -2239,6 +2751,23 @@ paths: examples: default_example: $ref: '#/components/examples/OAuthTokenGenerateResponseExample' + 4XX: + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400ResponseExample' + 401_example: + $ref: '#/components/examples/Error401ResponseExample' + 402_example: + $ref: '#/components/examples/Error402ResponseExample' + 403_example: + $ref: '#/components/examples/Error403ResponseExample' + 4XX_example: + $ref: '#/components/examples/Error4XXResponseExample' security: [] servers: - @@ -2322,6 +2851,23 @@ paths: examples: default_example: $ref: '#/components/examples/OAuthTokenRefreshResponseExample' + 4XX: + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400ResponseExample' + 401_example: + $ref: '#/components/examples/Error401ResponseExample' + 402_example: + $ref: '#/components/examples/Error402ResponseExample' + 403_example: + $ref: '#/components/examples/Error403ResponseExample' + 4XX_example: + $ref: '#/components/examples/Error4XXResponseExample' security: [] servers: - @@ -2703,7 +3249,7 @@ paths: The request will be canceled and signers will no longer be able to sign. If they try to access the signature request they will receive a HTTP 410 status code indicating that the resource has been deleted. Cancelation is asynchronous and a successful call to this endpoint will return an empty 200 OK response if the signature request is eligible to be canceled and has been successfully queued. - This 200 OK response does not indicate a successful cancelation of the signature request itself. The cancelation is confirmed via the `signature_request_canceled` event. It is recommended that a [callback handler](/api/reference/tag/Callbacks-and-Events) be implemented to listen for the `signature_request_canceled` event. This callback will be sent only when the cancelation has completed successfully. If a callback handler has been configured and the event has not been received within 60 minutes of making the call, check the status of the request in the [API Dashboard](https://app.hellosign.com/apidashboard) and retry the cancelation if necessary. + This 200 OK response does not indicate a successful cancelation of the signature request itself. The cancelation is confirmed via the `signature_request_canceled` event. It is recommended that a [callback handler](/api/reference/tag/Callbacks-and-Events) be implemented to listen for the `signature_request_canceled` event. This callback will be sent only when the cancelation has completed successfully. If a callback handler has been configured and the event has not been received within 60 minutes of making the call, check the status of the request in the [API Dashboard](https://app.hellosign.com/apidashboard) and retry the cancelation if necessary. To be eligible for cancelation, a signature request must have been sent successfully, must not yet have been signed by all signers, and you must either be the sender or own the API app under which it was sent. A partially signed signature request can be canceled. @@ -4617,7 +5163,7 @@ paths: 403_example: $ref: '#/components/examples/Error403ResponseExample' 404_example: - $ref: '#/components/examples/TeamDoesNotExistResponseExample' + $ref: '#/components/examples/Error404ResponseExample' 4XX_example: $ref: '#/components/examples/Error4XXResponseExample' security: @@ -5440,7 +5986,7 @@ paths: post: tags: - Template - summary: 'Create Template' + summary: 'Create Template' description: 'Creates a template that can then be used.' operationId: templateCreate requestBody: @@ -7345,6 +7891,50 @@ components: type: string format: email type: object + FaxSendRequest: + required: + - recipient + properties: + recipient: + description: 'Fax Send To Recipient' + type: string + example: recipient@example.com + sender: + description: 'Fax Send From Sender (used only with fax number)' + type: string + example: sender@example.com + files: + description: 'Fax File to Send' + type: array + items: + type: string + format: binary + file_urls: + description: 'Fax File URL to Send' + type: array + items: + type: string + test_mode: + description: 'API Test Mode Setting' + type: boolean + default: false + cover_page_to: + description: 'Fax Cover Page for Recipient' + type: string + example: 'Recipient Name' + cover_page_from: + description: 'Fax Cover Page for Sender' + type: string + example: 'Sender Name' + cover_page_message: + description: 'Fax Cover Page Message' + type: string + example: 'Please find the attached documents.' + title: + description: 'Fax Title' + type: string + example: 'Fax Title' + type: object OAuthTokenGenerateRequest: required: - client_id @@ -7382,6 +7972,12 @@ components: refresh_token: description: 'The token provided when you got the expired access token.' type: string + client_id: + description: 'The client ID for your API app. Mandatory from August 1st, 2025. Until then, required if the "Client Credentials Required" setting is enabled for token refresh; optional if disabled.' + type: string + client_secret: + description: 'The client secret for your API app. Mandatory from August 1st, 2025. Until then, required if the "Client Credentials Required" setting is enabled for token refresh; optional if disabled.' + type: string type: object ReportCreateRequest: required: @@ -9091,7 +9687,7 @@ components: properties: header_background_color: type: string - default: '#1A1A1A' + default: '#1a1a1a' legal_version: type: string default: terms1 @@ -9100,40 +9696,40 @@ components: - terms2 link_color: type: string - default: '#00B3E6' + default: '#0061FE' page_background_color: type: string - default: '#F7F8F9' + default: '#f7f8f9' primary_button_color: type: string - default: '#00B3E6' + default: '#0061FE' primary_button_color_hover: type: string - default: '#00B3E6' + default: '#0061FE' primary_button_text_color: type: string - default: '#FFFFFF' + default: '#ffffff' primary_button_text_color_hover: type: string - default: '#FFFFFF' + default: '#ffffff' secondary_button_color: type: string - default: '#FFFFFF' + default: '#ffffff' secondary_button_color_hover: type: string - default: '#FFFFFF' + default: '#ffffff' secondary_button_text_color: type: string - default: '#00B3E6' + default: '#0061FE' secondary_button_text_color_hover: type: string - default: '#00B3E6' + default: '#0061FE' text_color1: type: string default: '#808080' text_color2: type: string - default: '#FFFFFF' + default: '#ffffff' reset_to_default: description: 'Resets white labeling options to defaults. Only useful when updating an API App.' type: boolean @@ -10211,6 +10807,19 @@ components: error: $ref: '#/components/schemas/ErrorResponseError' type: object + FaxGetResponse: + required: + - fax + properties: + fax: + $ref: '#/components/schemas/FaxResponse' + warnings: + description: 'A list of warnings.' + type: array + items: + $ref: '#/components/schemas/WarningResponse' + type: object + x-internal-class: true FaxLineResponse: required: - fax_line @@ -10246,6 +10855,19 @@ components: $ref: '#/components/schemas/WarningResponse' type: object x-internal-class: true + FaxListResponse: + required: + - faxes + - list_info + properties: + faxes: + type: array + items: + $ref: '#/components/schemas/FaxResponse' + list_info: + $ref: '#/components/schemas/ListInfoResponse' + type: object + x-internal-class: true FileResponse: required: - file_url @@ -10388,7 +11010,7 @@ components: type: integer nullable: true sms_verifications_left: - description: 'SMS verifications remaining.' + description: 'SMS verifications remaining.' type: integer nullable: true num_fax_pages_left: @@ -10456,6 +11078,7 @@ components: secret: description: 'The app''s OAuth secret, or null if the app does not belong to user.' type: string + nullable: true scopes: description: 'Array of OAuth scopes used by the app.' type: array @@ -10589,6 +11212,54 @@ components: description: 'Name of the error.' type: string type: object + FaxResponse: + required: + - fax_id + - title + - original_title + - subject + - message + - metadata + - created_at + - sender + - transmissions + - files_url + properties: + fax_id: + description: 'Fax ID' + type: string + title: + description: 'Fax Title' + type: string + original_title: + description: 'Fax Original Title' + type: string + subject: + description: 'Fax Subject' + type: string + message: + description: 'Fax Message' + type: string + metadata: + description: 'Fax Metadata' + type: object + additionalProperties: {} + created_at: + description: 'Fax Created At Timestamp' + type: integer + sender: + description: 'Fax Sender Email' + type: string + transmissions: + description: 'Fax Transmissions List' + type: array + items: + $ref: '#/components/schemas/FaxResponseTransmission' + files_url: + description: 'Fax Files URL' + type: string + type: object + x-internal-class: true FaxLineResponseFaxLine: properties: number: @@ -10606,6 +11277,35 @@ components: $ref: '#/components/schemas/AccountResponse' type: object x-internal-class: true + FaxResponseTransmission: + required: + - recipient + - sender + - status_code + properties: + recipient: + description: 'Fax Transmission Recipient' + type: string + sender: + description: 'Fax Transmission Sender' + type: string + status_code: + description: 'Fax Transmission Status Code' + type: string + enum: + - success + - transmitting + - error_could_not_fax + - error_unknown + - error_busy + - error_no_answer + - error_disconnected + - error_bad_destination + sent_at: + description: 'Fax Transmission Sent Timestamp' + type: integer + type: object + x-internal-class: true ListInfoResponse: description: 'Contains pagination information about the data returned.' properties: @@ -11218,24 +11918,21 @@ components: description: 'Time the template was last updated.' type: integer is_embedded: - description: '`true` if this template was created using an embedded flow, `false` if it was created on our website.' + description: '`true` if this template was created using an embedded flow, `false` if it was created on our website. Will be `null` when you are not the creator of the Template.' type: boolean nullable: true is_creator: description: '`true` if you are the owner of this template, `false` if it''s been shared with you by a team member.' type: boolean - nullable: true can_edit: description: 'Indicates whether edit rights have been granted to you by the owner (always `true` if that''s you).' type: boolean - nullable: true is_locked: description: |- Indicates whether the template is locked. If `true`, then the template was created outside your quota and can only be used in `test_mode`. If `false`, then the template is within your quota and can be used to create signature requests. type: boolean - nullable: true metadata: description: 'The metadata attached to the template.' type: object @@ -11273,7 +11970,11 @@ components: type: array items: $ref: '#/components/schemas/TemplateResponseAccount' - nullable: true + attachments: + description: 'Signer attachments.' + type: array + items: + $ref: '#/components/schemas/SignatureRequestResponseAttachment' type: object x-internal-class: true TemplateResponseAccount: @@ -11377,7 +12078,6 @@ components: type: array items: $ref: '#/components/schemas/TemplateResponseDocumentStaticFieldBase' - nullable: true type: object x-internal-class: true TemplateResponseDocumentCustomFieldBase: @@ -11529,10 +12229,6 @@ components: required: description: 'Boolean showing whether or not this field is required.' type: boolean - group: - description: 'The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.' - type: string - nullable: true type: object discriminator: propertyName: type @@ -11549,12 +12245,12 @@ components: x-base-class: true TemplateResponseDocumentFormFieldCheckbox: description: 'This class extends `TemplateResponseDocumentFormFieldBase`' + required: + - type allOf: - $ref: '#/components/schemas/TemplateResponseDocumentFormFieldBase' - - required: - - type properties: type: description: |- @@ -11570,6 +12266,10 @@ components: * Initials Field uses `TemplateResponseDocumentFormFieldInitials` type: string default: checkbox + group: + description: 'The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.' + type: string + nullable: true type: object TemplateResponseDocumentFormFieldDateSigned: description: 'This class extends `TemplateResponseDocumentFormFieldBase`' @@ -11579,8 +12279,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentFormFieldBase' - - required: - - type properties: type: description: |- @@ -11596,6 +12294,10 @@ components: * Initials Field uses `TemplateResponseDocumentFormFieldInitials` type: string default: date_signed + group: + description: 'The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.' + type: string + nullable: true type: object TemplateResponseDocumentFormFieldDropdown: description: 'This class extends `TemplateResponseDocumentFormFieldBase`' @@ -11605,8 +12307,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentFormFieldBase' - - required: - - type properties: type: description: |- @@ -11622,6 +12322,10 @@ components: * Initials Field uses `TemplateResponseDocumentFormFieldInitials` type: string default: dropdown + group: + description: 'The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.' + type: string + nullable: true type: object TemplateResponseDocumentFormFieldHyperlink: description: 'This class extends `TemplateResponseDocumentFormFieldBase`' @@ -11631,8 +12335,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentFormFieldBase' - - required: - - type properties: type: description: |- @@ -11659,6 +12361,10 @@ components: fontFamily: description: 'Font family used in this form field''s text.' type: string + group: + description: 'The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.' + type: string + nullable: true type: object TemplateResponseDocumentFormFieldInitials: description: 'This class extends `TemplateResponseDocumentFormFieldBase`' @@ -11668,8 +12374,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentFormFieldBase' - - required: - - type properties: type: description: |- @@ -11685,6 +12389,10 @@ components: * Initials Field uses `TemplateResponseDocumentFormFieldInitials` type: string default: initials + group: + description: 'The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.' + type: string + nullable: true type: object TemplateResponseDocumentFormFieldRadio: description: 'This class extends `TemplateResponseDocumentFormFieldBase`' @@ -11695,8 +12403,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentFormFieldBase' - - required: - - type properties: type: description: |- @@ -11712,6 +12418,9 @@ components: * Initials Field uses `TemplateResponseDocumentFormFieldInitials` type: string default: radio + group: + description: 'The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.' + type: string type: object TemplateResponseDocumentFormFieldSignature: description: 'This class extends `TemplateResponseDocumentFormFieldBase`' @@ -11721,8 +12430,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentFormFieldBase' - - required: - - type properties: type: description: |- @@ -11738,6 +12445,10 @@ components: * Initials Field uses `TemplateResponseDocumentFormFieldInitials` type: string default: signature + group: + description: 'The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.' + type: string + nullable: true type: object TemplateResponseDocumentFormFieldText: description: 'This class extends `TemplateResponseDocumentFormFieldBase`' @@ -11747,8 +12458,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentFormFieldBase' - - required: - - type properties: type: description: |- @@ -11790,6 +12499,10 @@ components: - employer_identification_number - custom_regex nullable: true + group: + description: 'The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.' + type: string + nullable: true type: object TemplateResponseDocumentStaticFieldBase: description: 'An array describing static overlay fields. **NOTE:** Only available for certain subscriptions.' @@ -11849,8 +12562,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentStaticFieldBase' - - required: - - type properties: type: description: |- @@ -11875,8 +12586,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentStaticFieldBase' - - required: - - type properties: type: description: |- @@ -11901,8 +12610,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentStaticFieldBase' - - required: - - type properties: type: description: |- @@ -11927,8 +12634,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentStaticFieldBase' - - required: - - type properties: type: description: |- @@ -11953,8 +12658,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentStaticFieldBase' - - required: - - type properties: type: description: |- @@ -11979,8 +12682,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentStaticFieldBase' - - required: - - type properties: type: description: |- @@ -12005,8 +12706,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentStaticFieldBase' - - required: - - type properties: type: description: |- @@ -12031,8 +12730,6 @@ components: - $ref: '#/components/schemas/TemplateResponseDocumentStaticFieldBase' - - required: - - type properties: type: description: |- @@ -12418,6 +13115,10 @@ components: summary: 'Default Example' value: $ref: examples/json/FaxLineRemoveUserRequestExample.json + FaxSendRequestExample: + summary: 'Default Example' + value: + $ref: examples/json/FaxSendRequestExample.json OAuthTokenGenerateRequestExample: summary: 'OAuth Token Generate Example' value: @@ -12662,6 +13363,10 @@ components: summary: 'Error 4XX failed_operation' value: $ref: examples/json/Error4XXResponseExample.json + FaxGetResponseExample: + summary: 'Fax Response' + value: + $ref: examples/json/FaxGetResponseExample.json FaxLineResponseExample: summary: 'Sample Fax Line Response' value: @@ -12674,6 +13379,10 @@ components: summary: 'Sample Fax Line List Response' value: $ref: examples/json/FaxLineListResponseExample.json + FaxListResponseExample: + summary: 'Returns the properties and settings of multiple Faxes.' + value: + $ref: examples/json/FaxListResponseExample.json ReportCreateResponseExample: summary: Report value: diff --git a/pom.xml b/pom.xml index 63a2be0..43de87e 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ dropbox-sign jar dropbox-sign - 1.6.1 + 1.7.0 https://github.com/hellosign/dropbox-sign-java Use the Dropbox Sign Java SDK to connect your Java app to the service of Dropbox Sign in microseconds! diff --git a/run-build b/run-build index 44a8c55..ce4f11e 100755 --- a/run-build +++ b/run-build @@ -7,6 +7,15 @@ set -e DIR=$(cd `dirname $0` && pwd) WORKING_DIR="/app/java" +if [[ -n "$GITHUB_ACTIONS" ]]; then + printf "\nLogging in to docker.com ...\n" + echo "${DOCKER_TOKEN}" | docker login -u "${DOCKER_USERNAME}" --password-stdin +fi + +# cleanup +rm -f "${DIR}/src/main/java/com/dropbox/sign/api/"*.java +rm -f "${DIR}/src/main/java/com/dropbox/sign/model/"*.java + docker run --rm \ -v "${DIR}/:/local" \ openapitools/openapi-generator-cli:v7.8.0 generate \ diff --git a/src/main/java/com/dropbox/sign/ApiClient.java b/src/main/java/com/dropbox/sign/ApiClient.java index 84a8956..636e632 100644 --- a/src/main/java/com/dropbox/sign/ApiClient.java +++ b/src/main/java/com/dropbox/sign/ApiClient.java @@ -147,7 +147,7 @@ public ApiClient(Map authMap) { this.dateFormat = new RFC3339DateFormat(); // Set default User-Agent. - setUserAgent("OpenAPI-Generator/1.6.1/java"); + setUserAgent("OpenAPI-Generator/1.7.0/java"); // Setup authentications (key: authentication name, value: authentication). authentications = new HashMap<>(); diff --git a/src/main/java/com/dropbox/sign/Configuration.java b/src/main/java/com/dropbox/sign/Configuration.java index 5abb0ba..213392e 100644 --- a/src/main/java/com/dropbox/sign/Configuration.java +++ b/src/main/java/com/dropbox/sign/Configuration.java @@ -16,7 +16,7 @@ value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") public class Configuration { - public static final String VERSION = "1.6.1"; + public static final String VERSION = "1.7.0"; private static ApiClient defaultApiClient = new ApiClient(); diff --git a/src/main/java/com/dropbox/sign/api/FaxApi.java b/src/main/java/com/dropbox/sign/api/FaxApi.java new file mode 100644 index 0000000..ce101cc --- /dev/null +++ b/src/main/java/com/dropbox/sign/api/FaxApi.java @@ -0,0 +1,421 @@ +package com.dropbox.sign.api; + +import com.dropbox.sign.ApiClient; +import com.dropbox.sign.ApiException; +import com.dropbox.sign.ApiResponse; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.Pair; +import com.dropbox.sign.model.FaxGetResponse; +import com.dropbox.sign.model.FaxListResponse; +import com.dropbox.sign.model.FaxSendRequest; +import java.io.File; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import javax.ws.rs.core.GenericType; + +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.8.0") +public class FaxApi { + private ApiClient apiClient; + + public FaxApi() { + this(Configuration.getDefaultApiClient()); + } + + public FaxApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Get the API client + * + * @return API client + */ + public ApiClient getApiClient() { + return apiClient; + } + + /** + * Set the API client + * + * @param apiClient an instance of API client + */ + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Delete Fax. Deletes the specified Fax from the system. + * + * @param faxId Fax ID (required) + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + *
Status Code Description Response Headers
204 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ */ + public void faxDelete(String faxId) throws ApiException { + faxDeleteWithHttpInfo(faxId); + } + + /** + * Delete Fax. Deletes the specified Fax from the system. + * + * @param faxId Fax ID (required) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + *
Status Code Description Response Headers
204 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ */ + public ApiResponse faxDeleteWithHttpInfo(String faxId) throws ApiException { + + // Check required parameters + if (faxId == null) { + throw new ApiException( + 400, "Missing the required parameter 'faxId' when calling faxDelete"); + } + + // Path parameters + String localVarPath = + "/fax/{fax_id}".replaceAll("\\{fax_id}", apiClient.escapeString(faxId.toString())); + + String localVarAccept = apiClient.selectHeaderAccept("application/json"); + Map localVarFormParams = new LinkedHashMap<>(); + localVarFormParams = new HashMap(); + boolean isFileTypeFound = !localVarFormParams.isEmpty(); + String localVarContentType = + isFileTypeFound ? "multipart/form-data" : apiClient.selectHeaderContentType(); + String[] localVarAuthNames = new String[] {"api_key"}; + return apiClient.invokeAPI( + "FaxApi.faxDelete", + localVarPath, + "DELETE", + new ArrayList<>(), + null, + new LinkedHashMap<>(), + new LinkedHashMap<>(), + localVarFormParams, + localVarAccept, + localVarContentType, + localVarAuthNames, + null, + false); + } + + /** + * List Fax Files. Returns list of fax files + * + * @param faxId Fax ID (required) + * @return File + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ */ + public File faxFiles(String faxId) throws ApiException { + return faxFilesWithHttpInfo(faxId).getData(); + } + + /** + * List Fax Files. Returns list of fax files + * + * @param faxId Fax ID (required) + * @return ApiResponse<File> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ */ + public ApiResponse faxFilesWithHttpInfo(String faxId) throws ApiException { + + // Check required parameters + if (faxId == null) { + throw new ApiException( + 400, "Missing the required parameter 'faxId' when calling faxFiles"); + } + + // Path parameters + String localVarPath = + "/fax/files/{fax_id}" + .replaceAll("\\{fax_id}", apiClient.escapeString(faxId.toString())); + + String localVarAccept = apiClient.selectHeaderAccept("application/pdf", "application/json"); + Map localVarFormParams = new LinkedHashMap<>(); + localVarFormParams = new HashMap(); + boolean isFileTypeFound = !localVarFormParams.isEmpty(); + String localVarContentType = + isFileTypeFound ? "multipart/form-data" : apiClient.selectHeaderContentType(); + String[] localVarAuthNames = new String[] {"api_key"}; + GenericType localVarReturnType = new GenericType() {}; + return apiClient.invokeAPI( + "FaxApi.faxFiles", + localVarPath, + "GET", + new ArrayList<>(), + null, + new LinkedHashMap<>(), + new LinkedHashMap<>(), + localVarFormParams, + localVarAccept, + localVarContentType, + localVarAuthNames, + localVarReturnType, + false); + } + + /** + * Get Fax. Returns information about fax + * + * @param faxId Fax ID (required) + * @return FaxGetResponse + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ */ + public FaxGetResponse faxGet(String faxId) throws ApiException { + return faxGetWithHttpInfo(faxId).getData(); + } + + /** + * Get Fax. Returns information about fax + * + * @param faxId Fax ID (required) + * @return ApiResponse<FaxGetResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ */ + public ApiResponse faxGetWithHttpInfo(String faxId) throws ApiException { + + // Check required parameters + if (faxId == null) { + throw new ApiException( + 400, "Missing the required parameter 'faxId' when calling faxGet"); + } + + // Path parameters + String localVarPath = + "/fax/{fax_id}".replaceAll("\\{fax_id}", apiClient.escapeString(faxId.toString())); + + String localVarAccept = apiClient.selectHeaderAccept("application/json"); + Map localVarFormParams = new LinkedHashMap<>(); + localVarFormParams = new HashMap(); + boolean isFileTypeFound = !localVarFormParams.isEmpty(); + String localVarContentType = + isFileTypeFound ? "multipart/form-data" : apiClient.selectHeaderContentType(); + String[] localVarAuthNames = new String[] {"api_key"}; + GenericType localVarReturnType = new GenericType() {}; + return apiClient.invokeAPI( + "FaxApi.faxGet", + localVarPath, + "GET", + new ArrayList<>(), + null, + new LinkedHashMap<>(), + new LinkedHashMap<>(), + localVarFormParams, + localVarAccept, + localVarContentType, + localVarAuthNames, + localVarReturnType, + false); + } + + /** + * Lists Faxes. Returns properties of multiple faxes + * + * @param page Page (optional, default to 1) + * @param pageSize Page size (optional, default to 20) + * @return FaxListResponse + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ */ + public FaxListResponse faxList(Integer page, Integer pageSize) throws ApiException { + return faxListWithHttpInfo(page, pageSize).getData(); + } + + /** + * @see FaxApi#faxList(Integer, Integer) + */ + public FaxListResponse faxList() throws ApiException { + Integer page = 1; + Integer pageSize = 20; + + return faxListWithHttpInfo(page, pageSize).getData(); + } + + /** + * @see FaxApi#faxListWithHttpInfo(Integer, Integer) + */ + public ApiResponse faxListWithHttpInfo() throws ApiException { + Integer page = 1; + Integer pageSize = 20; + + return faxListWithHttpInfo(page, pageSize); + } + + /** + * @see FaxApi#faxList(Integer, Integer) + */ + public FaxListResponse faxList(Integer page) throws ApiException { + Integer pageSize = 20; + + return faxListWithHttpInfo(page, pageSize).getData(); + } + + /** + * @see FaxApi#faxListWithHttpInfo(Integer, Integer) + */ + public ApiResponse faxListWithHttpInfo(Integer page) throws ApiException { + Integer pageSize = 20; + + return faxListWithHttpInfo(page, pageSize); + } + + /** + * Lists Faxes. Returns properties of multiple faxes + * + * @param page Page (optional, default to 1) + * @param pageSize Page size (optional, default to 20) + * @return ApiResponse<FaxListResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ */ + public ApiResponse faxListWithHttpInfo(Integer page, Integer pageSize) + throws ApiException { + + if (page == null) { + page = 1; + } + if (pageSize == null) { + pageSize = 20; + } + // Query parameters + List localVarQueryParams = + new ArrayList<>(apiClient.parameterToPairs("", "page", page)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page_size", pageSize)); + + String localVarAccept = apiClient.selectHeaderAccept("application/json"); + Map localVarFormParams = new LinkedHashMap<>(); + localVarFormParams = new HashMap(); + boolean isFileTypeFound = !localVarFormParams.isEmpty(); + String localVarContentType = + isFileTypeFound ? "multipart/form-data" : apiClient.selectHeaderContentType(); + String[] localVarAuthNames = new String[] {"api_key"}; + GenericType localVarReturnType = new GenericType() {}; + return apiClient.invokeAPI( + "FaxApi.faxList", + "/fax/list", + "GET", + localVarQueryParams, + null, + new LinkedHashMap<>(), + new LinkedHashMap<>(), + localVarFormParams, + localVarAccept, + localVarContentType, + localVarAuthNames, + localVarReturnType, + false); + } + + /** + * Send Fax. Action to prepare and send a fax + * + * @param faxSendRequest (required) + * @return FaxGetResponse + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ */ + public FaxGetResponse faxSend(FaxSendRequest faxSendRequest) throws ApiException { + return faxSendWithHttpInfo(faxSendRequest).getData(); + } + + /** + * Send Fax. Action to prepare and send a fax + * + * @param faxSendRequest (required) + * @return ApiResponse<FaxGetResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ */ + public ApiResponse faxSendWithHttpInfo(FaxSendRequest faxSendRequest) + throws ApiException { + + // Check required parameters + if (faxSendRequest == null) { + throw new ApiException( + 400, "Missing the required parameter 'faxSendRequest' when calling faxSend"); + } + + String localVarAccept = apiClient.selectHeaderAccept("application/json"); + Map localVarFormParams = new LinkedHashMap<>(); + localVarFormParams = faxSendRequest.createFormData(); + boolean isFileTypeFound = !localVarFormParams.isEmpty(); + String localVarContentType = + isFileTypeFound + ? "multipart/form-data" + : apiClient.selectHeaderContentType( + "application/json", "multipart/form-data"); + String[] localVarAuthNames = new String[] {"api_key"}; + GenericType localVarReturnType = new GenericType() {}; + return apiClient.invokeAPI( + "FaxApi.faxSend", + "/fax/send", + "POST", + new ArrayList<>(), + isFileTypeFound ? null : faxSendRequest, + new LinkedHashMap<>(), + new LinkedHashMap<>(), + localVarFormParams, + localVarAccept, + localVarContentType, + localVarAuthNames, + localVarReturnType, + false); + } +} diff --git a/src/main/java/com/dropbox/sign/api/OAuthApi.java b/src/main/java/com/dropbox/sign/api/OAuthApi.java index f9e6d08..db4fbb1 100644 --- a/src/main/java/com/dropbox/sign/api/OAuthApi.java +++ b/src/main/java/com/dropbox/sign/api/OAuthApi.java @@ -55,6 +55,7 @@ public void setApiClient(ApiClient apiClient) { * * * + * *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
*/ public OAuthTokenResponse oauthTokenGenerate( @@ -73,6 +74,7 @@ public OAuthTokenResponse oauthTokenGenerate( * * * + * *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
*/ public ApiResponse oauthTokenGenerateWithHttpInfo( @@ -125,6 +127,7 @@ public ApiResponse oauthTokenGenerateWithHttpInfo( * * * + * *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
*/ public OAuthTokenResponse oauthTokenRefresh(OAuthTokenRefreshRequest oauthTokenRefreshRequest) @@ -145,6 +148,7 @@ public OAuthTokenResponse oauthTokenRefresh(OAuthTokenRefreshRequest oauthTokenR * * * + * *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
*/ public ApiResponse oauthTokenRefreshWithHttpInfo( diff --git a/src/main/java/com/dropbox/sign/model/FaxGetResponse.java b/src/main/java/com/dropbox/sign/model/FaxGetResponse.java new file mode 100644 index 0000000..c4f86dd --- /dev/null +++ b/src/main/java/com/dropbox/sign/model/FaxGetResponse.java @@ -0,0 +1,221 @@ +/* + * Dropbox Sign API + * Dropbox Sign v3 API + * + * The version of the OpenAPI document: 3.0.0 + * Contact: apisupport@hellosign.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.dropbox.sign.model; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.JSON; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.databind.ObjectMapper; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** FaxGetResponse */ +@JsonPropertyOrder({FaxGetResponse.JSON_PROPERTY_FAX, FaxGetResponse.JSON_PROPERTY_WARNINGS}) +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.8.0") +@JsonIgnoreProperties(ignoreUnknown = true) +public class FaxGetResponse { + public static final String JSON_PROPERTY_FAX = "fax"; + private FaxResponse fax; + + public static final String JSON_PROPERTY_WARNINGS = "warnings"; + private List warnings = null; + + public FaxGetResponse() {} + + /** + * Attempt to instantiate and hydrate a new instance of this class + * + * @param jsonData String of JSON data representing target object + */ + public static FaxGetResponse init(String jsonData) throws Exception { + return new ObjectMapper().readValue(jsonData, FaxGetResponse.class); + } + + public static FaxGetResponse init(HashMap data) throws Exception { + return new ObjectMapper() + .readValue(new ObjectMapper().writeValueAsString(data), FaxGetResponse.class); + } + + public FaxGetResponse fax(FaxResponse fax) { + this.fax = fax; + return this; + } + + /** + * Get fax + * + * @return fax + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_FAX) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public FaxResponse getFax() { + return fax; + } + + @JsonProperty(JSON_PROPERTY_FAX) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setFax(FaxResponse fax) { + this.fax = fax; + } + + public FaxGetResponse warnings(List warnings) { + this.warnings = warnings; + return this; + } + + public FaxGetResponse addWarningsItem(WarningResponse warningsItem) { + if (this.warnings == null) { + this.warnings = new ArrayList<>(); + } + this.warnings.add(warningsItem); + return this; + } + + /** + * A list of warnings. + * + * @return warnings + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_WARNINGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getWarnings() { + return warnings; + } + + @JsonProperty(JSON_PROPERTY_WARNINGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setWarnings(List warnings) { + this.warnings = warnings; + } + + /** Return true if this FaxGetResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FaxGetResponse faxGetResponse = (FaxGetResponse) o; + return Objects.equals(this.fax, faxGetResponse.fax) + && Objects.equals(this.warnings, faxGetResponse.warnings); + } + + @Override + public int hashCode() { + return Objects.hash(fax, warnings); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FaxGetResponse {\n"); + sb.append(" fax: ").append(toIndentedString(fax)).append("\n"); + sb.append(" warnings: ").append(toIndentedString(warnings)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public Map createFormData() throws ApiException { + Map map = new HashMap<>(); + boolean fileTypeFound = false; + try { + if (fax != null) { + if (isFileTypeOrListOfFiles(fax)) { + fileTypeFound = true; + } + + if (fax.getClass().equals(java.io.File.class) + || fax.getClass().equals(Integer.class) + || fax.getClass().equals(String.class) + || fax.getClass().isEnum()) { + map.put("fax", fax); + } else if (isListOfFile(fax)) { + for (int i = 0; i < getListSize(fax); i++) { + map.put("fax[" + i + "]", getFromList(fax, i)); + } + } else { + map.put("fax", JSON.getDefault().getMapper().writeValueAsString(fax)); + } + } + if (warnings != null) { + if (isFileTypeOrListOfFiles(warnings)) { + fileTypeFound = true; + } + + if (warnings.getClass().equals(java.io.File.class) + || warnings.getClass().equals(Integer.class) + || warnings.getClass().equals(String.class) + || warnings.getClass().isEnum()) { + map.put("warnings", warnings); + } else if (isListOfFile(warnings)) { + for (int i = 0; i < getListSize(warnings); i++) { + map.put("warnings[" + i + "]", getFromList(warnings, i)); + } + } else { + map.put("warnings", JSON.getDefault().getMapper().writeValueAsString(warnings)); + } + } + } catch (Exception e) { + throw new ApiException(e); + } + + return fileTypeFound ? map : new HashMap<>(); + } + + private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { + return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); + } + + private boolean isListOfFile(Object obj) throws Exception { + return obj instanceof java.util.List + && !isListEmpty(obj) + && getFromList(obj, 0) instanceof java.io.File; + } + + private boolean isListEmpty(Object obj) throws Exception { + return (boolean) + Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); + } + + private Object getFromList(Object obj, int index) throws Exception { + return Class.forName(java.util.List.class.getName()) + .getMethod("get", int.class) + .invoke(obj, index); + } + + private int getListSize(Object obj) throws Exception { + return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/dropbox/sign/model/FaxListResponse.java b/src/main/java/com/dropbox/sign/model/FaxListResponse.java new file mode 100644 index 0000000..7da2189 --- /dev/null +++ b/src/main/java/com/dropbox/sign/model/FaxListResponse.java @@ -0,0 +1,224 @@ +/* + * Dropbox Sign API + * Dropbox Sign v3 API + * + * The version of the OpenAPI document: 3.0.0 + * Contact: apisupport@hellosign.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.dropbox.sign.model; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.JSON; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.databind.ObjectMapper; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** FaxListResponse */ +@JsonPropertyOrder({FaxListResponse.JSON_PROPERTY_FAXES, FaxListResponse.JSON_PROPERTY_LIST_INFO}) +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.8.0") +@JsonIgnoreProperties(ignoreUnknown = true) +public class FaxListResponse { + public static final String JSON_PROPERTY_FAXES = "faxes"; + private List faxes = new ArrayList<>(); + + public static final String JSON_PROPERTY_LIST_INFO = "list_info"; + private ListInfoResponse listInfo; + + public FaxListResponse() {} + + /** + * Attempt to instantiate and hydrate a new instance of this class + * + * @param jsonData String of JSON data representing target object + */ + public static FaxListResponse init(String jsonData) throws Exception { + return new ObjectMapper().readValue(jsonData, FaxListResponse.class); + } + + public static FaxListResponse init(HashMap data) throws Exception { + return new ObjectMapper() + .readValue(new ObjectMapper().writeValueAsString(data), FaxListResponse.class); + } + + public FaxListResponse faxes(List faxes) { + this.faxes = faxes; + return this; + } + + public FaxListResponse addFaxesItem(FaxResponse faxesItem) { + if (this.faxes == null) { + this.faxes = new ArrayList<>(); + } + this.faxes.add(faxesItem); + return this; + } + + /** + * Get faxes + * + * @return faxes + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_FAXES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getFaxes() { + return faxes; + } + + @JsonProperty(JSON_PROPERTY_FAXES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setFaxes(List faxes) { + this.faxes = faxes; + } + + public FaxListResponse listInfo(ListInfoResponse listInfo) { + this.listInfo = listInfo; + return this; + } + + /** + * Get listInfo + * + * @return listInfo + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_LIST_INFO) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ListInfoResponse getListInfo() { + return listInfo; + } + + @JsonProperty(JSON_PROPERTY_LIST_INFO) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setListInfo(ListInfoResponse listInfo) { + this.listInfo = listInfo; + } + + /** Return true if this FaxListResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FaxListResponse faxListResponse = (FaxListResponse) o; + return Objects.equals(this.faxes, faxListResponse.faxes) + && Objects.equals(this.listInfo, faxListResponse.listInfo); + } + + @Override + public int hashCode() { + return Objects.hash(faxes, listInfo); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FaxListResponse {\n"); + sb.append(" faxes: ").append(toIndentedString(faxes)).append("\n"); + sb.append(" listInfo: ").append(toIndentedString(listInfo)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public Map createFormData() throws ApiException { + Map map = new HashMap<>(); + boolean fileTypeFound = false; + try { + if (faxes != null) { + if (isFileTypeOrListOfFiles(faxes)) { + fileTypeFound = true; + } + + if (faxes.getClass().equals(java.io.File.class) + || faxes.getClass().equals(Integer.class) + || faxes.getClass().equals(String.class) + || faxes.getClass().isEnum()) { + map.put("faxes", faxes); + } else if (isListOfFile(faxes)) { + for (int i = 0; i < getListSize(faxes); i++) { + map.put("faxes[" + i + "]", getFromList(faxes, i)); + } + } else { + map.put("faxes", JSON.getDefault().getMapper().writeValueAsString(faxes)); + } + } + if (listInfo != null) { + if (isFileTypeOrListOfFiles(listInfo)) { + fileTypeFound = true; + } + + if (listInfo.getClass().equals(java.io.File.class) + || listInfo.getClass().equals(Integer.class) + || listInfo.getClass().equals(String.class) + || listInfo.getClass().isEnum()) { + map.put("list_info", listInfo); + } else if (isListOfFile(listInfo)) { + for (int i = 0; i < getListSize(listInfo); i++) { + map.put("list_info[" + i + "]", getFromList(listInfo, i)); + } + } else { + map.put( + "list_info", + JSON.getDefault().getMapper().writeValueAsString(listInfo)); + } + } + } catch (Exception e) { + throw new ApiException(e); + } + + return fileTypeFound ? map : new HashMap<>(); + } + + private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { + return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); + } + + private boolean isListOfFile(Object obj) throws Exception { + return obj instanceof java.util.List + && !isListEmpty(obj) + && getFromList(obj, 0) instanceof java.io.File; + } + + private boolean isListEmpty(Object obj) throws Exception { + return (boolean) + Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); + } + + private Object getFromList(Object obj, int index) throws Exception { + return Class.forName(java.util.List.class.getName()) + .getMethod("get", int.class) + .invoke(obj, index); + } + + private int getListSize(Object obj) throws Exception { + return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/dropbox/sign/model/FaxResponse.java b/src/main/java/com/dropbox/sign/model/FaxResponse.java new file mode 100644 index 0000000..bbe2dcd --- /dev/null +++ b/src/main/java/com/dropbox/sign/model/FaxResponse.java @@ -0,0 +1,627 @@ +/* + * Dropbox Sign API + * Dropbox Sign v3 API + * + * The version of the OpenAPI document: 3.0.0 + * Contact: apisupport@hellosign.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.dropbox.sign.model; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.JSON; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.databind.ObjectMapper; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** FaxResponse */ +@JsonPropertyOrder({ + FaxResponse.JSON_PROPERTY_FAX_ID, + FaxResponse.JSON_PROPERTY_TITLE, + FaxResponse.JSON_PROPERTY_ORIGINAL_TITLE, + FaxResponse.JSON_PROPERTY_SUBJECT, + FaxResponse.JSON_PROPERTY_MESSAGE, + FaxResponse.JSON_PROPERTY_METADATA, + FaxResponse.JSON_PROPERTY_CREATED_AT, + FaxResponse.JSON_PROPERTY_SENDER, + FaxResponse.JSON_PROPERTY_TRANSMISSIONS, + FaxResponse.JSON_PROPERTY_FILES_URL +}) +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.8.0") +@JsonIgnoreProperties(ignoreUnknown = true) +public class FaxResponse { + public static final String JSON_PROPERTY_FAX_ID = "fax_id"; + private String faxId; + + public static final String JSON_PROPERTY_TITLE = "title"; + private String title; + + public static final String JSON_PROPERTY_ORIGINAL_TITLE = "original_title"; + private String originalTitle; + + public static final String JSON_PROPERTY_SUBJECT = "subject"; + private String subject; + + public static final String JSON_PROPERTY_MESSAGE = "message"; + private String message; + + public static final String JSON_PROPERTY_METADATA = "metadata"; + private Map metadata = new HashMap<>(); + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private Integer createdAt; + + public static final String JSON_PROPERTY_SENDER = "sender"; + private String sender; + + public static final String JSON_PROPERTY_TRANSMISSIONS = "transmissions"; + private List transmissions = new ArrayList<>(); + + public static final String JSON_PROPERTY_FILES_URL = "files_url"; + private String filesUrl; + + public FaxResponse() {} + + /** + * Attempt to instantiate and hydrate a new instance of this class + * + * @param jsonData String of JSON data representing target object + */ + public static FaxResponse init(String jsonData) throws Exception { + return new ObjectMapper().readValue(jsonData, FaxResponse.class); + } + + public static FaxResponse init(HashMap data) throws Exception { + return new ObjectMapper() + .readValue(new ObjectMapper().writeValueAsString(data), FaxResponse.class); + } + + public FaxResponse faxId(String faxId) { + this.faxId = faxId; + return this; + } + + /** + * Fax ID + * + * @return faxId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_FAX_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getFaxId() { + return faxId; + } + + @JsonProperty(JSON_PROPERTY_FAX_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setFaxId(String faxId) { + this.faxId = faxId; + } + + public FaxResponse title(String title) { + this.title = title; + return this; + } + + /** + * Fax Title + * + * @return title + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getTitle() { + return title; + } + + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTitle(String title) { + this.title = title; + } + + public FaxResponse originalTitle(String originalTitle) { + this.originalTitle = originalTitle; + return this; + } + + /** + * Fax Original Title + * + * @return originalTitle + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ORIGINAL_TITLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getOriginalTitle() { + return originalTitle; + } + + @JsonProperty(JSON_PROPERTY_ORIGINAL_TITLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setOriginalTitle(String originalTitle) { + this.originalTitle = originalTitle; + } + + public FaxResponse subject(String subject) { + this.subject = subject; + return this; + } + + /** + * Fax Subject + * + * @return subject + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SUBJECT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getSubject() { + return subject; + } + + @JsonProperty(JSON_PROPERTY_SUBJECT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSubject(String subject) { + this.subject = subject; + } + + public FaxResponse message(String message) { + this.message = message; + return this; + } + + /** + * Fax Message + * + * @return message + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getMessage() { + return message; + } + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMessage(String message) { + this.message = message; + } + + public FaxResponse metadata(Map metadata) { + this.metadata = metadata; + return this; + } + + public FaxResponse putMetadataItem(String key, Object metadataItem) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.put(key, metadataItem); + return this; + } + + /** + * Fax Metadata + * + * @return metadata + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public Map getMetadata() { + return metadata; + } + + @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) + public void setMetadata(Map metadata) { + this.metadata = metadata; + } + + public FaxResponse createdAt(Integer createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Fax Created At Timestamp + * + * @return createdAt + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getCreatedAt() { + return createdAt; + } + + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedAt(Integer createdAt) { + this.createdAt = createdAt; + } + + public FaxResponse sender(String sender) { + this.sender = sender; + return this; + } + + /** + * Fax Sender Email + * + * @return sender + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SENDER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getSender() { + return sender; + } + + @JsonProperty(JSON_PROPERTY_SENDER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSender(String sender) { + this.sender = sender; + } + + public FaxResponse transmissions(List transmissions) { + this.transmissions = transmissions; + return this; + } + + public FaxResponse addTransmissionsItem(FaxResponseTransmission transmissionsItem) { + if (this.transmissions == null) { + this.transmissions = new ArrayList<>(); + } + this.transmissions.add(transmissionsItem); + return this; + } + + /** + * Fax Transmissions List + * + * @return transmissions + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TRANSMISSIONS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTransmissions() { + return transmissions; + } + + @JsonProperty(JSON_PROPERTY_TRANSMISSIONS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTransmissions(List transmissions) { + this.transmissions = transmissions; + } + + public FaxResponse filesUrl(String filesUrl) { + this.filesUrl = filesUrl; + return this; + } + + /** + * Fax Files URL + * + * @return filesUrl + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_FILES_URL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getFilesUrl() { + return filesUrl; + } + + @JsonProperty(JSON_PROPERTY_FILES_URL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setFilesUrl(String filesUrl) { + this.filesUrl = filesUrl; + } + + /** Return true if this FaxResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FaxResponse faxResponse = (FaxResponse) o; + return Objects.equals(this.faxId, faxResponse.faxId) + && Objects.equals(this.title, faxResponse.title) + && Objects.equals(this.originalTitle, faxResponse.originalTitle) + && Objects.equals(this.subject, faxResponse.subject) + && Objects.equals(this.message, faxResponse.message) + && Objects.equals(this.metadata, faxResponse.metadata) + && Objects.equals(this.createdAt, faxResponse.createdAt) + && Objects.equals(this.sender, faxResponse.sender) + && Objects.equals(this.transmissions, faxResponse.transmissions) + && Objects.equals(this.filesUrl, faxResponse.filesUrl); + } + + @Override + public int hashCode() { + return Objects.hash( + faxId, + title, + originalTitle, + subject, + message, + metadata, + createdAt, + sender, + transmissions, + filesUrl); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FaxResponse {\n"); + sb.append(" faxId: ").append(toIndentedString(faxId)).append("\n"); + sb.append(" title: ").append(toIndentedString(title)).append("\n"); + sb.append(" originalTitle: ").append(toIndentedString(originalTitle)).append("\n"); + sb.append(" subject: ").append(toIndentedString(subject)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" sender: ").append(toIndentedString(sender)).append("\n"); + sb.append(" transmissions: ").append(toIndentedString(transmissions)).append("\n"); + sb.append(" filesUrl: ").append(toIndentedString(filesUrl)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public Map createFormData() throws ApiException { + Map map = new HashMap<>(); + boolean fileTypeFound = false; + try { + if (faxId != null) { + if (isFileTypeOrListOfFiles(faxId)) { + fileTypeFound = true; + } + + if (faxId.getClass().equals(java.io.File.class) + || faxId.getClass().equals(Integer.class) + || faxId.getClass().equals(String.class) + || faxId.getClass().isEnum()) { + map.put("fax_id", faxId); + } else if (isListOfFile(faxId)) { + for (int i = 0; i < getListSize(faxId); i++) { + map.put("fax_id[" + i + "]", getFromList(faxId, i)); + } + } else { + map.put("fax_id", JSON.getDefault().getMapper().writeValueAsString(faxId)); + } + } + if (title != null) { + if (isFileTypeOrListOfFiles(title)) { + fileTypeFound = true; + } + + if (title.getClass().equals(java.io.File.class) + || title.getClass().equals(Integer.class) + || title.getClass().equals(String.class) + || title.getClass().isEnum()) { + map.put("title", title); + } else if (isListOfFile(title)) { + for (int i = 0; i < getListSize(title); i++) { + map.put("title[" + i + "]", getFromList(title, i)); + } + } else { + map.put("title", JSON.getDefault().getMapper().writeValueAsString(title)); + } + } + if (originalTitle != null) { + if (isFileTypeOrListOfFiles(originalTitle)) { + fileTypeFound = true; + } + + if (originalTitle.getClass().equals(java.io.File.class) + || originalTitle.getClass().equals(Integer.class) + || originalTitle.getClass().equals(String.class) + || originalTitle.getClass().isEnum()) { + map.put("original_title", originalTitle); + } else if (isListOfFile(originalTitle)) { + for (int i = 0; i < getListSize(originalTitle); i++) { + map.put("original_title[" + i + "]", getFromList(originalTitle, i)); + } + } else { + map.put( + "original_title", + JSON.getDefault().getMapper().writeValueAsString(originalTitle)); + } + } + if (subject != null) { + if (isFileTypeOrListOfFiles(subject)) { + fileTypeFound = true; + } + + if (subject.getClass().equals(java.io.File.class) + || subject.getClass().equals(Integer.class) + || subject.getClass().equals(String.class) + || subject.getClass().isEnum()) { + map.put("subject", subject); + } else if (isListOfFile(subject)) { + for (int i = 0; i < getListSize(subject); i++) { + map.put("subject[" + i + "]", getFromList(subject, i)); + } + } else { + map.put("subject", JSON.getDefault().getMapper().writeValueAsString(subject)); + } + } + if (message != null) { + if (isFileTypeOrListOfFiles(message)) { + fileTypeFound = true; + } + + if (message.getClass().equals(java.io.File.class) + || message.getClass().equals(Integer.class) + || message.getClass().equals(String.class) + || message.getClass().isEnum()) { + map.put("message", message); + } else if (isListOfFile(message)) { + for (int i = 0; i < getListSize(message); i++) { + map.put("message[" + i + "]", getFromList(message, i)); + } + } else { + map.put("message", JSON.getDefault().getMapper().writeValueAsString(message)); + } + } + if (metadata != null) { + if (isFileTypeOrListOfFiles(metadata)) { + fileTypeFound = true; + } + + if (metadata.getClass().equals(java.io.File.class) + || metadata.getClass().equals(Integer.class) + || metadata.getClass().equals(String.class) + || metadata.getClass().isEnum()) { + map.put("metadata", metadata); + } else if (isListOfFile(metadata)) { + for (int i = 0; i < getListSize(metadata); i++) { + map.put("metadata[" + i + "]", getFromList(metadata, i)); + } + } else { + map.put("metadata", JSON.getDefault().getMapper().writeValueAsString(metadata)); + } + } + if (createdAt != null) { + if (isFileTypeOrListOfFiles(createdAt)) { + fileTypeFound = true; + } + + if (createdAt.getClass().equals(java.io.File.class) + || createdAt.getClass().equals(Integer.class) + || createdAt.getClass().equals(String.class) + || createdAt.getClass().isEnum()) { + map.put("created_at", createdAt); + } else if (isListOfFile(createdAt)) { + for (int i = 0; i < getListSize(createdAt); i++) { + map.put("created_at[" + i + "]", getFromList(createdAt, i)); + } + } else { + map.put( + "created_at", + JSON.getDefault().getMapper().writeValueAsString(createdAt)); + } + } + if (sender != null) { + if (isFileTypeOrListOfFiles(sender)) { + fileTypeFound = true; + } + + if (sender.getClass().equals(java.io.File.class) + || sender.getClass().equals(Integer.class) + || sender.getClass().equals(String.class) + || sender.getClass().isEnum()) { + map.put("sender", sender); + } else if (isListOfFile(sender)) { + for (int i = 0; i < getListSize(sender); i++) { + map.put("sender[" + i + "]", getFromList(sender, i)); + } + } else { + map.put("sender", JSON.getDefault().getMapper().writeValueAsString(sender)); + } + } + if (transmissions != null) { + if (isFileTypeOrListOfFiles(transmissions)) { + fileTypeFound = true; + } + + if (transmissions.getClass().equals(java.io.File.class) + || transmissions.getClass().equals(Integer.class) + || transmissions.getClass().equals(String.class) + || transmissions.getClass().isEnum()) { + map.put("transmissions", transmissions); + } else if (isListOfFile(transmissions)) { + for (int i = 0; i < getListSize(transmissions); i++) { + map.put("transmissions[" + i + "]", getFromList(transmissions, i)); + } + } else { + map.put( + "transmissions", + JSON.getDefault().getMapper().writeValueAsString(transmissions)); + } + } + if (filesUrl != null) { + if (isFileTypeOrListOfFiles(filesUrl)) { + fileTypeFound = true; + } + + if (filesUrl.getClass().equals(java.io.File.class) + || filesUrl.getClass().equals(Integer.class) + || filesUrl.getClass().equals(String.class) + || filesUrl.getClass().isEnum()) { + map.put("files_url", filesUrl); + } else if (isListOfFile(filesUrl)) { + for (int i = 0; i < getListSize(filesUrl); i++) { + map.put("files_url[" + i + "]", getFromList(filesUrl, i)); + } + } else { + map.put( + "files_url", + JSON.getDefault().getMapper().writeValueAsString(filesUrl)); + } + } + } catch (Exception e) { + throw new ApiException(e); + } + + return fileTypeFound ? map : new HashMap<>(); + } + + private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { + return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); + } + + private boolean isListOfFile(Object obj) throws Exception { + return obj instanceof java.util.List + && !isListEmpty(obj) + && getFromList(obj, 0) instanceof java.io.File; + } + + private boolean isListEmpty(Object obj) throws Exception { + return (boolean) + Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); + } + + private Object getFromList(Object obj, int index) throws Exception { + return Class.forName(java.util.List.class.getName()) + .getMethod("get", int.class) + .invoke(obj, index); + } + + private int getListSize(Object obj) throws Exception { + return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/dropbox/sign/model/FaxResponseTransmission.java b/src/main/java/com/dropbox/sign/model/FaxResponseTransmission.java new file mode 100644 index 0000000..8ab9288 --- /dev/null +++ b/src/main/java/com/dropbox/sign/model/FaxResponseTransmission.java @@ -0,0 +1,360 @@ +/* + * Dropbox Sign API + * Dropbox Sign v3 API + * + * The version of the OpenAPI document: 3.0.0 + * Contact: apisupport@hellosign.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.dropbox.sign.model; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.JSON; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.databind.ObjectMapper; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** FaxResponseTransmission */ +@JsonPropertyOrder({ + FaxResponseTransmission.JSON_PROPERTY_RECIPIENT, + FaxResponseTransmission.JSON_PROPERTY_SENDER, + FaxResponseTransmission.JSON_PROPERTY_STATUS_CODE, + FaxResponseTransmission.JSON_PROPERTY_SENT_AT +}) +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.8.0") +@JsonIgnoreProperties(ignoreUnknown = true) +public class FaxResponseTransmission { + public static final String JSON_PROPERTY_RECIPIENT = "recipient"; + private String recipient; + + public static final String JSON_PROPERTY_SENDER = "sender"; + private String sender; + + /** Fax Transmission Status Code */ + public enum StatusCodeEnum { + SUCCESS("success"), + + TRANSMITTING("transmitting"), + + ERROR_COULD_NOT_FAX("error_could_not_fax"), + + ERROR_UNKNOWN("error_unknown"), + + ERROR_BUSY("error_busy"), + + ERROR_NO_ANSWER("error_no_answer"), + + ERROR_DISCONNECTED("error_disconnected"), + + ERROR_BAD_DESTINATION("error_bad_destination"); + + private String value; + + StatusCodeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusCodeEnum fromValue(String value) { + for (StatusCodeEnum b : StatusCodeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_STATUS_CODE = "status_code"; + private StatusCodeEnum statusCode; + + public static final String JSON_PROPERTY_SENT_AT = "sent_at"; + private Integer sentAt; + + public FaxResponseTransmission() {} + + /** + * Attempt to instantiate and hydrate a new instance of this class + * + * @param jsonData String of JSON data representing target object + */ + public static FaxResponseTransmission init(String jsonData) throws Exception { + return new ObjectMapper().readValue(jsonData, FaxResponseTransmission.class); + } + + public static FaxResponseTransmission init(HashMap data) throws Exception { + return new ObjectMapper() + .readValue( + new ObjectMapper().writeValueAsString(data), FaxResponseTransmission.class); + } + + public FaxResponseTransmission recipient(String recipient) { + this.recipient = recipient; + return this; + } + + /** + * Fax Transmission Recipient + * + * @return recipient + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RECIPIENT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getRecipient() { + return recipient; + } + + @JsonProperty(JSON_PROPERTY_RECIPIENT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRecipient(String recipient) { + this.recipient = recipient; + } + + public FaxResponseTransmission sender(String sender) { + this.sender = sender; + return this; + } + + /** + * Fax Transmission Sender + * + * @return sender + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SENDER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getSender() { + return sender; + } + + @JsonProperty(JSON_PROPERTY_SENDER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSender(String sender) { + this.sender = sender; + } + + public FaxResponseTransmission statusCode(StatusCodeEnum statusCode) { + this.statusCode = statusCode; + return this; + } + + /** + * Fax Transmission Status Code + * + * @return statusCode + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS_CODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public StatusCodeEnum getStatusCode() { + return statusCode; + } + + @JsonProperty(JSON_PROPERTY_STATUS_CODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatusCode(StatusCodeEnum statusCode) { + this.statusCode = statusCode; + } + + public FaxResponseTransmission sentAt(Integer sentAt) { + this.sentAt = sentAt; + return this; + } + + /** + * Fax Transmission Sent Timestamp + * + * @return sentAt + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SENT_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getSentAt() { + return sentAt; + } + + @JsonProperty(JSON_PROPERTY_SENT_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSentAt(Integer sentAt) { + this.sentAt = sentAt; + } + + /** Return true if this FaxResponseTransmission object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FaxResponseTransmission faxResponseTransmission = (FaxResponseTransmission) o; + return Objects.equals(this.recipient, faxResponseTransmission.recipient) + && Objects.equals(this.sender, faxResponseTransmission.sender) + && Objects.equals(this.statusCode, faxResponseTransmission.statusCode) + && Objects.equals(this.sentAt, faxResponseTransmission.sentAt); + } + + @Override + public int hashCode() { + return Objects.hash(recipient, sender, statusCode, sentAt); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FaxResponseTransmission {\n"); + sb.append(" recipient: ").append(toIndentedString(recipient)).append("\n"); + sb.append(" sender: ").append(toIndentedString(sender)).append("\n"); + sb.append(" statusCode: ").append(toIndentedString(statusCode)).append("\n"); + sb.append(" sentAt: ").append(toIndentedString(sentAt)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public Map createFormData() throws ApiException { + Map map = new HashMap<>(); + boolean fileTypeFound = false; + try { + if (recipient != null) { + if (isFileTypeOrListOfFiles(recipient)) { + fileTypeFound = true; + } + + if (recipient.getClass().equals(java.io.File.class) + || recipient.getClass().equals(Integer.class) + || recipient.getClass().equals(String.class) + || recipient.getClass().isEnum()) { + map.put("recipient", recipient); + } else if (isListOfFile(recipient)) { + for (int i = 0; i < getListSize(recipient); i++) { + map.put("recipient[" + i + "]", getFromList(recipient, i)); + } + } else { + map.put( + "recipient", + JSON.getDefault().getMapper().writeValueAsString(recipient)); + } + } + if (sender != null) { + if (isFileTypeOrListOfFiles(sender)) { + fileTypeFound = true; + } + + if (sender.getClass().equals(java.io.File.class) + || sender.getClass().equals(Integer.class) + || sender.getClass().equals(String.class) + || sender.getClass().isEnum()) { + map.put("sender", sender); + } else if (isListOfFile(sender)) { + for (int i = 0; i < getListSize(sender); i++) { + map.put("sender[" + i + "]", getFromList(sender, i)); + } + } else { + map.put("sender", JSON.getDefault().getMapper().writeValueAsString(sender)); + } + } + if (statusCode != null) { + if (isFileTypeOrListOfFiles(statusCode)) { + fileTypeFound = true; + } + + if (statusCode.getClass().equals(java.io.File.class) + || statusCode.getClass().equals(Integer.class) + || statusCode.getClass().equals(String.class) + || statusCode.getClass().isEnum()) { + map.put("status_code", statusCode); + } else if (isListOfFile(statusCode)) { + for (int i = 0; i < getListSize(statusCode); i++) { + map.put("status_code[" + i + "]", getFromList(statusCode, i)); + } + } else { + map.put( + "status_code", + JSON.getDefault().getMapper().writeValueAsString(statusCode)); + } + } + if (sentAt != null) { + if (isFileTypeOrListOfFiles(sentAt)) { + fileTypeFound = true; + } + + if (sentAt.getClass().equals(java.io.File.class) + || sentAt.getClass().equals(Integer.class) + || sentAt.getClass().equals(String.class) + || sentAt.getClass().isEnum()) { + map.put("sent_at", sentAt); + } else if (isListOfFile(sentAt)) { + for (int i = 0; i < getListSize(sentAt); i++) { + map.put("sent_at[" + i + "]", getFromList(sentAt, i)); + } + } else { + map.put("sent_at", JSON.getDefault().getMapper().writeValueAsString(sentAt)); + } + } + } catch (Exception e) { + throw new ApiException(e); + } + + return fileTypeFound ? map : new HashMap<>(); + } + + private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { + return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); + } + + private boolean isListOfFile(Object obj) throws Exception { + return obj instanceof java.util.List + && !isListEmpty(obj) + && getFromList(obj, 0) instanceof java.io.File; + } + + private boolean isListEmpty(Object obj) throws Exception { + return (boolean) + Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); + } + + private Object getFromList(Object obj, int index) throws Exception { + return Class.forName(java.util.List.class.getName()) + .getMethod("get", int.class) + .invoke(obj, index); + } + + private int getListSize(Object obj) throws Exception { + return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/dropbox/sign/model/FaxSendRequest.java b/src/main/java/com/dropbox/sign/model/FaxSendRequest.java new file mode 100644 index 0000000..571ba92 --- /dev/null +++ b/src/main/java/com/dropbox/sign/model/FaxSendRequest.java @@ -0,0 +1,576 @@ +/* + * Dropbox Sign API + * Dropbox Sign v3 API + * + * The version of the OpenAPI document: 3.0.0 + * Contact: apisupport@hellosign.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.dropbox.sign.model; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.JSON; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.databind.ObjectMapper; +import java.io.File; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** FaxSendRequest */ +@JsonPropertyOrder({ + FaxSendRequest.JSON_PROPERTY_RECIPIENT, + FaxSendRequest.JSON_PROPERTY_SENDER, + FaxSendRequest.JSON_PROPERTY_FILES, + FaxSendRequest.JSON_PROPERTY_FILE_URLS, + FaxSendRequest.JSON_PROPERTY_TEST_MODE, + FaxSendRequest.JSON_PROPERTY_COVER_PAGE_TO, + FaxSendRequest.JSON_PROPERTY_COVER_PAGE_FROM, + FaxSendRequest.JSON_PROPERTY_COVER_PAGE_MESSAGE, + FaxSendRequest.JSON_PROPERTY_TITLE +}) +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.8.0") +@JsonIgnoreProperties(ignoreUnknown = true) +public class FaxSendRequest { + public static final String JSON_PROPERTY_RECIPIENT = "recipient"; + private String recipient; + + public static final String JSON_PROPERTY_SENDER = "sender"; + private String sender; + + public static final String JSON_PROPERTY_FILES = "files"; + private List files = null; + + public static final String JSON_PROPERTY_FILE_URLS = "file_urls"; + private List fileUrls = null; + + public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; + private Boolean testMode = false; + + public static final String JSON_PROPERTY_COVER_PAGE_TO = "cover_page_to"; + private String coverPageTo; + + public static final String JSON_PROPERTY_COVER_PAGE_FROM = "cover_page_from"; + private String coverPageFrom; + + public static final String JSON_PROPERTY_COVER_PAGE_MESSAGE = "cover_page_message"; + private String coverPageMessage; + + public static final String JSON_PROPERTY_TITLE = "title"; + private String title; + + public FaxSendRequest() {} + + /** + * Attempt to instantiate and hydrate a new instance of this class + * + * @param jsonData String of JSON data representing target object + */ + public static FaxSendRequest init(String jsonData) throws Exception { + return new ObjectMapper().readValue(jsonData, FaxSendRequest.class); + } + + public static FaxSendRequest init(HashMap data) throws Exception { + return new ObjectMapper() + .readValue(new ObjectMapper().writeValueAsString(data), FaxSendRequest.class); + } + + public FaxSendRequest recipient(String recipient) { + this.recipient = recipient; + return this; + } + + /** + * Fax Send To Recipient + * + * @return recipient + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RECIPIENT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getRecipient() { + return recipient; + } + + @JsonProperty(JSON_PROPERTY_RECIPIENT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRecipient(String recipient) { + this.recipient = recipient; + } + + public FaxSendRequest sender(String sender) { + this.sender = sender; + return this; + } + + /** + * Fax Send From Sender (used only with fax number) + * + * @return sender + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SENDER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSender() { + return sender; + } + + @JsonProperty(JSON_PROPERTY_SENDER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSender(String sender) { + this.sender = sender; + } + + public FaxSendRequest files(List files) { + this.files = files; + return this; + } + + public FaxSendRequest addFilesItem(File filesItem) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.add(filesItem); + return this; + } + + /** + * Fax File to Send + * + * @return files + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FILES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getFiles() { + return files; + } + + @JsonProperty(JSON_PROPERTY_FILES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFiles(List files) { + this.files = files; + } + + public FaxSendRequest fileUrls(List fileUrls) { + this.fileUrls = fileUrls; + return this; + } + + public FaxSendRequest addFileUrlsItem(String fileUrlsItem) { + if (this.fileUrls == null) { + this.fileUrls = new ArrayList<>(); + } + this.fileUrls.add(fileUrlsItem); + return this; + } + + /** + * Fax File URL to Send + * + * @return fileUrls + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FILE_URLS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getFileUrls() { + return fileUrls; + } + + @JsonProperty(JSON_PROPERTY_FILE_URLS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFileUrls(List fileUrls) { + this.fileUrls = fileUrls; + } + + public FaxSendRequest testMode(Boolean testMode) { + this.testMode = testMode; + return this; + } + + /** + * API Test Mode Setting + * + * @return testMode + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_TEST_MODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getTestMode() { + return testMode; + } + + @JsonProperty(JSON_PROPERTY_TEST_MODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTestMode(Boolean testMode) { + this.testMode = testMode; + } + + public FaxSendRequest coverPageTo(String coverPageTo) { + this.coverPageTo = coverPageTo; + return this; + } + + /** + * Fax Cover Page for Recipient + * + * @return coverPageTo + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_COVER_PAGE_TO) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCoverPageTo() { + return coverPageTo; + } + + @JsonProperty(JSON_PROPERTY_COVER_PAGE_TO) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCoverPageTo(String coverPageTo) { + this.coverPageTo = coverPageTo; + } + + public FaxSendRequest coverPageFrom(String coverPageFrom) { + this.coverPageFrom = coverPageFrom; + return this; + } + + /** + * Fax Cover Page for Sender + * + * @return coverPageFrom + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_COVER_PAGE_FROM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCoverPageFrom() { + return coverPageFrom; + } + + @JsonProperty(JSON_PROPERTY_COVER_PAGE_FROM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCoverPageFrom(String coverPageFrom) { + this.coverPageFrom = coverPageFrom; + } + + public FaxSendRequest coverPageMessage(String coverPageMessage) { + this.coverPageMessage = coverPageMessage; + return this; + } + + /** + * Fax Cover Page Message + * + * @return coverPageMessage + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_COVER_PAGE_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCoverPageMessage() { + return coverPageMessage; + } + + @JsonProperty(JSON_PROPERTY_COVER_PAGE_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCoverPageMessage(String coverPageMessage) { + this.coverPageMessage = coverPageMessage; + } + + public FaxSendRequest title(String title) { + this.title = title; + return this; + } + + /** + * Fax Title + * + * @return title + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTitle() { + return title; + } + + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTitle(String title) { + this.title = title; + } + + /** Return true if this FaxSendRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FaxSendRequest faxSendRequest = (FaxSendRequest) o; + return Objects.equals(this.recipient, faxSendRequest.recipient) + && Objects.equals(this.sender, faxSendRequest.sender) + && Objects.equals(this.files, faxSendRequest.files) + && Objects.equals(this.fileUrls, faxSendRequest.fileUrls) + && Objects.equals(this.testMode, faxSendRequest.testMode) + && Objects.equals(this.coverPageTo, faxSendRequest.coverPageTo) + && Objects.equals(this.coverPageFrom, faxSendRequest.coverPageFrom) + && Objects.equals(this.coverPageMessage, faxSendRequest.coverPageMessage) + && Objects.equals(this.title, faxSendRequest.title); + } + + @Override + public int hashCode() { + return Objects.hash( + recipient, + sender, + files, + fileUrls, + testMode, + coverPageTo, + coverPageFrom, + coverPageMessage, + title); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FaxSendRequest {\n"); + sb.append(" recipient: ").append(toIndentedString(recipient)).append("\n"); + sb.append(" sender: ").append(toIndentedString(sender)).append("\n"); + sb.append(" files: ").append(toIndentedString(files)).append("\n"); + sb.append(" fileUrls: ").append(toIndentedString(fileUrls)).append("\n"); + sb.append(" testMode: ").append(toIndentedString(testMode)).append("\n"); + sb.append(" coverPageTo: ").append(toIndentedString(coverPageTo)).append("\n"); + sb.append(" coverPageFrom: ").append(toIndentedString(coverPageFrom)).append("\n"); + sb.append(" coverPageMessage: ").append(toIndentedString(coverPageMessage)).append("\n"); + sb.append(" title: ").append(toIndentedString(title)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public Map createFormData() throws ApiException { + Map map = new HashMap<>(); + boolean fileTypeFound = false; + try { + if (recipient != null) { + if (isFileTypeOrListOfFiles(recipient)) { + fileTypeFound = true; + } + + if (recipient.getClass().equals(java.io.File.class) + || recipient.getClass().equals(Integer.class) + || recipient.getClass().equals(String.class) + || recipient.getClass().isEnum()) { + map.put("recipient", recipient); + } else if (isListOfFile(recipient)) { + for (int i = 0; i < getListSize(recipient); i++) { + map.put("recipient[" + i + "]", getFromList(recipient, i)); + } + } else { + map.put( + "recipient", + JSON.getDefault().getMapper().writeValueAsString(recipient)); + } + } + if (sender != null) { + if (isFileTypeOrListOfFiles(sender)) { + fileTypeFound = true; + } + + if (sender.getClass().equals(java.io.File.class) + || sender.getClass().equals(Integer.class) + || sender.getClass().equals(String.class) + || sender.getClass().isEnum()) { + map.put("sender", sender); + } else if (isListOfFile(sender)) { + for (int i = 0; i < getListSize(sender); i++) { + map.put("sender[" + i + "]", getFromList(sender, i)); + } + } else { + map.put("sender", JSON.getDefault().getMapper().writeValueAsString(sender)); + } + } + if (files != null) { + if (isFileTypeOrListOfFiles(files)) { + fileTypeFound = true; + } + + if (files.getClass().equals(java.io.File.class) + || files.getClass().equals(Integer.class) + || files.getClass().equals(String.class) + || files.getClass().isEnum()) { + map.put("files", files); + } else if (isListOfFile(files)) { + for (int i = 0; i < getListSize(files); i++) { + map.put("files[" + i + "]", getFromList(files, i)); + } + } else { + map.put("files", JSON.getDefault().getMapper().writeValueAsString(files)); + } + } + if (fileUrls != null) { + if (isFileTypeOrListOfFiles(fileUrls)) { + fileTypeFound = true; + } + + if (fileUrls.getClass().equals(java.io.File.class) + || fileUrls.getClass().equals(Integer.class) + || fileUrls.getClass().equals(String.class) + || fileUrls.getClass().isEnum()) { + map.put("file_urls", fileUrls); + } else if (isListOfFile(fileUrls)) { + for (int i = 0; i < getListSize(fileUrls); i++) { + map.put("file_urls[" + i + "]", getFromList(fileUrls, i)); + } + } else { + map.put( + "file_urls", + JSON.getDefault().getMapper().writeValueAsString(fileUrls)); + } + } + if (testMode != null) { + if (isFileTypeOrListOfFiles(testMode)) { + fileTypeFound = true; + } + + if (testMode.getClass().equals(java.io.File.class) + || testMode.getClass().equals(Integer.class) + || testMode.getClass().equals(String.class) + || testMode.getClass().isEnum()) { + map.put("test_mode", testMode); + } else if (isListOfFile(testMode)) { + for (int i = 0; i < getListSize(testMode); i++) { + map.put("test_mode[" + i + "]", getFromList(testMode, i)); + } + } else { + map.put( + "test_mode", + JSON.getDefault().getMapper().writeValueAsString(testMode)); + } + } + if (coverPageTo != null) { + if (isFileTypeOrListOfFiles(coverPageTo)) { + fileTypeFound = true; + } + + if (coverPageTo.getClass().equals(java.io.File.class) + || coverPageTo.getClass().equals(Integer.class) + || coverPageTo.getClass().equals(String.class) + || coverPageTo.getClass().isEnum()) { + map.put("cover_page_to", coverPageTo); + } else if (isListOfFile(coverPageTo)) { + for (int i = 0; i < getListSize(coverPageTo); i++) { + map.put("cover_page_to[" + i + "]", getFromList(coverPageTo, i)); + } + } else { + map.put( + "cover_page_to", + JSON.getDefault().getMapper().writeValueAsString(coverPageTo)); + } + } + if (coverPageFrom != null) { + if (isFileTypeOrListOfFiles(coverPageFrom)) { + fileTypeFound = true; + } + + if (coverPageFrom.getClass().equals(java.io.File.class) + || coverPageFrom.getClass().equals(Integer.class) + || coverPageFrom.getClass().equals(String.class) + || coverPageFrom.getClass().isEnum()) { + map.put("cover_page_from", coverPageFrom); + } else if (isListOfFile(coverPageFrom)) { + for (int i = 0; i < getListSize(coverPageFrom); i++) { + map.put("cover_page_from[" + i + "]", getFromList(coverPageFrom, i)); + } + } else { + map.put( + "cover_page_from", + JSON.getDefault().getMapper().writeValueAsString(coverPageFrom)); + } + } + if (coverPageMessage != null) { + if (isFileTypeOrListOfFiles(coverPageMessage)) { + fileTypeFound = true; + } + + if (coverPageMessage.getClass().equals(java.io.File.class) + || coverPageMessage.getClass().equals(Integer.class) + || coverPageMessage.getClass().equals(String.class) + || coverPageMessage.getClass().isEnum()) { + map.put("cover_page_message", coverPageMessage); + } else if (isListOfFile(coverPageMessage)) { + for (int i = 0; i < getListSize(coverPageMessage); i++) { + map.put("cover_page_message[" + i + "]", getFromList(coverPageMessage, i)); + } + } else { + map.put( + "cover_page_message", + JSON.getDefault().getMapper().writeValueAsString(coverPageMessage)); + } + } + if (title != null) { + if (isFileTypeOrListOfFiles(title)) { + fileTypeFound = true; + } + + if (title.getClass().equals(java.io.File.class) + || title.getClass().equals(Integer.class) + || title.getClass().equals(String.class) + || title.getClass().isEnum()) { + map.put("title", title); + } else if (isListOfFile(title)) { + for (int i = 0; i < getListSize(title); i++) { + map.put("title[" + i + "]", getFromList(title, i)); + } + } else { + map.put("title", JSON.getDefault().getMapper().writeValueAsString(title)); + } + } + } catch (Exception e) { + throw new ApiException(e); + } + + return fileTypeFound ? map : new HashMap<>(); + } + + private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { + return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); + } + + private boolean isListOfFile(Object obj) throws Exception { + return obj instanceof java.util.List + && !isListEmpty(obj) + && getFromList(obj, 0) instanceof java.io.File; + } + + private boolean isListEmpty(Object obj) throws Exception { + return (boolean) + Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); + } + + private Object getFromList(Object obj, int index) throws Exception { + return Class.forName(java.util.List.class.getName()) + .getMethod("get", int.class) + .invoke(obj, index); + } + + private int getListSize(Object obj) throws Exception { + return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/dropbox/sign/model/OAuthTokenRefreshRequest.java b/src/main/java/com/dropbox/sign/model/OAuthTokenRefreshRequest.java index 6aa0a05..7597982 100644 --- a/src/main/java/com/dropbox/sign/model/OAuthTokenRefreshRequest.java +++ b/src/main/java/com/dropbox/sign/model/OAuthTokenRefreshRequest.java @@ -26,7 +26,9 @@ /** OAuthTokenRefreshRequest */ @JsonPropertyOrder({ OAuthTokenRefreshRequest.JSON_PROPERTY_GRANT_TYPE, - OAuthTokenRefreshRequest.JSON_PROPERTY_REFRESH_TOKEN + OAuthTokenRefreshRequest.JSON_PROPERTY_REFRESH_TOKEN, + OAuthTokenRefreshRequest.JSON_PROPERTY_CLIENT_ID, + OAuthTokenRefreshRequest.JSON_PROPERTY_CLIENT_SECRET }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", @@ -39,6 +41,12 @@ public class OAuthTokenRefreshRequest { public static final String JSON_PROPERTY_REFRESH_TOKEN = "refresh_token"; private String refreshToken; + public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; + private String clientId; + + public static final String JSON_PROPERTY_CLIENT_SECRET = "client_secret"; + private String clientSecret; + public OAuthTokenRefreshRequest() {} /** @@ -103,6 +111,54 @@ public void setRefreshToken(String refreshToken) { this.refreshToken = refreshToken; } + public OAuthTokenRefreshRequest clientId(String clientId) { + this.clientId = clientId; + return this; + } + + /** + * The client ID for your API app. Mandatory from August 1st, 2025. Until then, required if the + * \"Client Credentials Required\" setting is enabled for token refresh; optional if + * disabled. + * + * @return clientId + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CLIENT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getClientId() { + return clientId; + } + + @JsonProperty(JSON_PROPERTY_CLIENT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setClientId(String clientId) { + this.clientId = clientId; + } + + public OAuthTokenRefreshRequest clientSecret(String clientSecret) { + this.clientSecret = clientSecret; + return this; + } + + /** + * The client secret for your API app. Mandatory from August 1st, 2025. Until then, required if + * the \"Client Credentials Required\" setting is enabled for token refresh; optional + * if disabled. + * + * @return clientSecret + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CLIENT_SECRET) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getClientSecret() { + return clientSecret; + } + + @JsonProperty(JSON_PROPERTY_CLIENT_SECRET) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setClientSecret(String clientSecret) { + this.clientSecret = clientSecret; + } + /** Return true if this OAuthTokenRefreshRequest object is equal to o. */ @Override public boolean equals(Object o) { @@ -114,12 +170,14 @@ public boolean equals(Object o) { } OAuthTokenRefreshRequest oauthTokenRefreshRequest = (OAuthTokenRefreshRequest) o; return Objects.equals(this.grantType, oauthTokenRefreshRequest.grantType) - && Objects.equals(this.refreshToken, oauthTokenRefreshRequest.refreshToken); + && Objects.equals(this.refreshToken, oauthTokenRefreshRequest.refreshToken) + && Objects.equals(this.clientId, oauthTokenRefreshRequest.clientId) + && Objects.equals(this.clientSecret, oauthTokenRefreshRequest.clientSecret); } @Override public int hashCode() { - return Objects.hash(grantType, refreshToken); + return Objects.hash(grantType, refreshToken, clientId, clientSecret); } @Override @@ -128,6 +186,8 @@ public String toString() { sb.append("class OAuthTokenRefreshRequest {\n"); sb.append(" grantType: ").append(toIndentedString(grantType)).append("\n"); sb.append(" refreshToken: ").append(toIndentedString(refreshToken)).append("\n"); + sb.append(" clientId: ").append(toIndentedString(clientId)).append("\n"); + sb.append(" clientSecret: ").append(toIndentedString(clientSecret)).append("\n"); sb.append("}"); return sb.toString(); } @@ -176,6 +236,46 @@ public Map createFormData() throws ApiException { JSON.getDefault().getMapper().writeValueAsString(refreshToken)); } } + if (clientId != null) { + if (isFileTypeOrListOfFiles(clientId)) { + fileTypeFound = true; + } + + if (clientId.getClass().equals(java.io.File.class) + || clientId.getClass().equals(Integer.class) + || clientId.getClass().equals(String.class) + || clientId.getClass().isEnum()) { + map.put("client_id", clientId); + } else if (isListOfFile(clientId)) { + for (int i = 0; i < getListSize(clientId); i++) { + map.put("client_id[" + i + "]", getFromList(clientId, i)); + } + } else { + map.put( + "client_id", + JSON.getDefault().getMapper().writeValueAsString(clientId)); + } + } + if (clientSecret != null) { + if (isFileTypeOrListOfFiles(clientSecret)) { + fileTypeFound = true; + } + + if (clientSecret.getClass().equals(java.io.File.class) + || clientSecret.getClass().equals(Integer.class) + || clientSecret.getClass().equals(String.class) + || clientSecret.getClass().isEnum()) { + map.put("client_secret", clientSecret); + } else if (isListOfFile(clientSecret)) { + for (int i = 0; i < getListSize(clientSecret); i++) { + map.put("client_secret[" + i + "]", getFromList(clientSecret, i)); + } + } else { + map.put( + "client_secret", + JSON.getDefault().getMapper().writeValueAsString(clientSecret)); + } + } } catch (Exception e) { throw new ApiException(e); } diff --git a/src/main/java/com/dropbox/sign/model/SubWhiteLabelingOptions.java b/src/main/java/com/dropbox/sign/model/SubWhiteLabelingOptions.java index 450ca3d..2737e1b 100644 --- a/src/main/java/com/dropbox/sign/model/SubWhiteLabelingOptions.java +++ b/src/main/java/com/dropbox/sign/model/SubWhiteLabelingOptions.java @@ -53,7 +53,7 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class SubWhiteLabelingOptions { public static final String JSON_PROPERTY_HEADER_BACKGROUND_COLOR = "header_background_color"; - private String headerBackgroundColor = "#1A1A1A"; + private String headerBackgroundColor = "#1a1a1a"; /** Gets or Sets legalVersion */ public enum LegalVersionEnum { @@ -92,46 +92,46 @@ public static LegalVersionEnum fromValue(String value) { private LegalVersionEnum legalVersion = LegalVersionEnum.TERMS1; public static final String JSON_PROPERTY_LINK_COLOR = "link_color"; - private String linkColor = "#00B3E6"; + private String linkColor = "#0061FE"; public static final String JSON_PROPERTY_PAGE_BACKGROUND_COLOR = "page_background_color"; - private String pageBackgroundColor = "#F7F8F9"; + private String pageBackgroundColor = "#f7f8f9"; public static final String JSON_PROPERTY_PRIMARY_BUTTON_COLOR = "primary_button_color"; - private String primaryButtonColor = "#00B3E6"; + private String primaryButtonColor = "#0061FE"; public static final String JSON_PROPERTY_PRIMARY_BUTTON_COLOR_HOVER = "primary_button_color_hover"; - private String primaryButtonColorHover = "#00B3E6"; + private String primaryButtonColorHover = "#0061FE"; public static final String JSON_PROPERTY_PRIMARY_BUTTON_TEXT_COLOR = "primary_button_text_color"; - private String primaryButtonTextColor = "#FFFFFF"; + private String primaryButtonTextColor = "#ffffff"; public static final String JSON_PROPERTY_PRIMARY_BUTTON_TEXT_COLOR_HOVER = "primary_button_text_color_hover"; - private String primaryButtonTextColorHover = "#FFFFFF"; + private String primaryButtonTextColorHover = "#ffffff"; public static final String JSON_PROPERTY_SECONDARY_BUTTON_COLOR = "secondary_button_color"; - private String secondaryButtonColor = "#FFFFFF"; + private String secondaryButtonColor = "#ffffff"; public static final String JSON_PROPERTY_SECONDARY_BUTTON_COLOR_HOVER = "secondary_button_color_hover"; - private String secondaryButtonColorHover = "#FFFFFF"; + private String secondaryButtonColorHover = "#ffffff"; public static final String JSON_PROPERTY_SECONDARY_BUTTON_TEXT_COLOR = "secondary_button_text_color"; - private String secondaryButtonTextColor = "#00B3E6"; + private String secondaryButtonTextColor = "#0061FE"; public static final String JSON_PROPERTY_SECONDARY_BUTTON_TEXT_COLOR_HOVER = "secondary_button_text_color_hover"; - private String secondaryButtonTextColorHover = "#00B3E6"; + private String secondaryButtonTextColorHover = "#0061FE"; public static final String JSON_PROPERTY_TEXT_COLOR1 = "text_color1"; private String textColor1 = "#808080"; public static final String JSON_PROPERTY_TEXT_COLOR2 = "text_color2"; - private String textColor2 = "#FFFFFF"; + private String textColor2 = "#ffffff"; public static final String JSON_PROPERTY_RESET_TO_DEFAULT = "reset_to_default"; private Boolean resetToDefault; diff --git a/src/main/java/com/dropbox/sign/model/TemplateResponse.java b/src/main/java/com/dropbox/sign/model/TemplateResponse.java index 3a0e14a..6e50048 100644 --- a/src/main/java/com/dropbox/sign/model/TemplateResponse.java +++ b/src/main/java/com/dropbox/sign/model/TemplateResponse.java @@ -41,7 +41,8 @@ TemplateResponse.JSON_PROPERTY_DOCUMENTS, TemplateResponse.JSON_PROPERTY_CUSTOM_FIELDS, TemplateResponse.JSON_PROPERTY_NAMED_FORM_FIELDS, - TemplateResponse.JSON_PROPERTY_ACCOUNTS + TemplateResponse.JSON_PROPERTY_ACCOUNTS, + TemplateResponse.JSON_PROPERTY_ATTACHMENTS }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", @@ -93,6 +94,9 @@ public class TemplateResponse { public static final String JSON_PROPERTY_ACCOUNTS = "accounts"; private List accounts = null; + public static final String JSON_PROPERTY_ATTACHMENTS = "attachments"; + private List attachments = null; + public TemplateResponse() {} /** @@ -207,7 +211,8 @@ public TemplateResponse isEmbedded(Boolean isEmbedded) { /** * `true` if this template was created using an embedded flow, `false` if it - * was created on our website. + * was created on our website. Will be `null` when you are not the creator of the + * Template. * * @return isEmbedded */ @@ -514,6 +519,36 @@ public void setAccounts(List accounts) { this.accounts = accounts; } + public TemplateResponse attachments(List attachments) { + this.attachments = attachments; + return this; + } + + public TemplateResponse addAttachmentsItem(SignatureRequestResponseAttachment attachmentsItem) { + if (this.attachments == null) { + this.attachments = new ArrayList<>(); + } + this.attachments.add(attachmentsItem); + return this; + } + + /** + * Signer attachments. + * + * @return attachments + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ATTACHMENTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getAttachments() { + return attachments; + } + + @JsonProperty(JSON_PROPERTY_ATTACHMENTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAttachments(List attachments) { + this.attachments = attachments; + } + /** Return true if this TemplateResponse object is equal to o. */ @Override public boolean equals(Object o) { @@ -538,7 +573,8 @@ public boolean equals(Object o) { && Objects.equals(this.documents, templateResponse.documents) && Objects.equals(this.customFields, templateResponse.customFields) && Objects.equals(this.namedFormFields, templateResponse.namedFormFields) - && Objects.equals(this.accounts, templateResponse.accounts); + && Objects.equals(this.accounts, templateResponse.accounts) + && Objects.equals(this.attachments, templateResponse.attachments); } @Override @@ -558,7 +594,8 @@ public int hashCode() { documents, customFields, namedFormFields, - accounts); + accounts, + attachments); } @Override @@ -580,6 +617,7 @@ public String toString() { sb.append(" customFields: ").append(toIndentedString(customFields)).append("\n"); sb.append(" namedFormFields: ").append(toIndentedString(namedFormFields)).append("\n"); sb.append(" accounts: ").append(toIndentedString(accounts)).append("\n"); + sb.append(" attachments: ").append(toIndentedString(attachments)).append("\n"); sb.append("}"); return sb.toString(); } @@ -876,6 +914,26 @@ public Map createFormData() throws ApiException { map.put("accounts", JSON.getDefault().getMapper().writeValueAsString(accounts)); } } + if (attachments != null) { + if (isFileTypeOrListOfFiles(attachments)) { + fileTypeFound = true; + } + + if (attachments.getClass().equals(java.io.File.class) + || attachments.getClass().equals(Integer.class) + || attachments.getClass().equals(String.class) + || attachments.getClass().isEnum()) { + map.put("attachments", attachments); + } else if (isListOfFile(attachments)) { + for (int i = 0; i < getListSize(attachments); i++) { + map.put("attachments[" + i + "]", getFromList(attachments, i)); + } + } else { + map.put( + "attachments", + JSON.getDefault().getMapper().writeValueAsString(attachments)); + } + } } catch (Exception e) { throw new ApiException(e); } diff --git a/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldBase.java b/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldBase.java index 86b9974..3694064 100644 --- a/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldBase.java +++ b/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldBase.java @@ -35,8 +35,7 @@ TemplateResponseDocumentFormFieldBase.JSON_PROPERTY_Y, TemplateResponseDocumentFormFieldBase.JSON_PROPERTY_WIDTH, TemplateResponseDocumentFormFieldBase.JSON_PROPERTY_HEIGHT, - TemplateResponseDocumentFormFieldBase.JSON_PROPERTY_REQUIRED, - TemplateResponseDocumentFormFieldBase.JSON_PROPERTY_GROUP + TemplateResponseDocumentFormFieldBase.JSON_PROPERTY_REQUIRED }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", @@ -93,9 +92,6 @@ public class TemplateResponseDocumentFormFieldBase { public static final String JSON_PROPERTY_REQUIRED = "required"; private Boolean required; - public static final String JSON_PROPERTY_GROUP = "group"; - private String group; - public TemplateResponseDocumentFormFieldBase() {} /** @@ -322,29 +318,6 @@ public void setRequired(Boolean required) { this.required = required; } - public TemplateResponseDocumentFormFieldBase group(String group) { - this.group = group; - return this; - } - - /** - * The name of the group this field is in. If this field is not a group, this defaults to - * `null` except for Radio fields. - * - * @return group - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_GROUP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getGroup() { - return group; - } - - @JsonProperty(JSON_PROPERTY_GROUP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setGroup(String group) { - this.group = group; - } - /** Return true if this TemplateResponseDocumentFormFieldBase object is equal to o. */ @Override public boolean equals(Object o) { @@ -364,13 +337,12 @@ public boolean equals(Object o) { && Objects.equals(this.y, templateResponseDocumentFormFieldBase.y) && Objects.equals(this.width, templateResponseDocumentFormFieldBase.width) && Objects.equals(this.height, templateResponseDocumentFormFieldBase.height) - && Objects.equals(this.required, templateResponseDocumentFormFieldBase.required) - && Objects.equals(this.group, templateResponseDocumentFormFieldBase.group); + && Objects.equals(this.required, templateResponseDocumentFormFieldBase.required); } @Override public int hashCode() { - return Objects.hash(type, apiId, name, signer, x, y, width, height, required, group); + return Objects.hash(type, apiId, name, signer, x, y, width, height, required); } @Override @@ -386,7 +358,6 @@ public String toString() { sb.append(" width: ").append(toIndentedString(width)).append("\n"); sb.append(" height: ").append(toIndentedString(height)).append("\n"); sb.append(" required: ").append(toIndentedString(required)).append("\n"); - sb.append(" group: ").append(toIndentedString(group)).append("\n"); sb.append("}"); return sb.toString(); } @@ -557,24 +528,6 @@ public Map createFormData() throws ApiException { map.put("required", JSON.getDefault().getMapper().writeValueAsString(required)); } } - if (group != null) { - if (isFileTypeOrListOfFiles(group)) { - fileTypeFound = true; - } - - if (group.getClass().equals(java.io.File.class) - || group.getClass().equals(Integer.class) - || group.getClass().equals(String.class) - || group.getClass().isEnum()) { - map.put("group", group); - } else if (isListOfFile(group)) { - for (int i = 0; i < getListSize(group); i++) { - map.put("group[" + i + "]", getFromList(group, i)); - } - } else { - map.put("group", JSON.getDefault().getMapper().writeValueAsString(group)); - } - } } catch (Exception e) { throw new ApiException(e); } diff --git a/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldCheckbox.java b/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldCheckbox.java index e7469c5..b291ffd 100644 --- a/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldCheckbox.java +++ b/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldCheckbox.java @@ -25,7 +25,10 @@ import java.util.Objects; /** This class extends `TemplateResponseDocumentFormFieldBase` */ -@JsonPropertyOrder({TemplateResponseDocumentFormFieldCheckbox.JSON_PROPERTY_TYPE}) +@JsonPropertyOrder({ + TemplateResponseDocumentFormFieldCheckbox.JSON_PROPERTY_TYPE, + TemplateResponseDocumentFormFieldCheckbox.JSON_PROPERTY_GROUP +}) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") @@ -42,6 +45,9 @@ public class TemplateResponseDocumentFormFieldCheckbox public static final String JSON_PROPERTY_TYPE = "type"; private String type = "checkbox"; + public static final String JSON_PROPERTY_GROUP = "group"; + private String group; + public TemplateResponseDocumentFormFieldCheckbox() {} /** @@ -92,6 +98,29 @@ public void setType(String type) { this.type = type; } + public TemplateResponseDocumentFormFieldCheckbox group(String group) { + this.group = group; + return this; + } + + /** + * The name of the group this field is in. If this field is not a group, this defaults to + * `null` except for Radio fields. + * + * @return group + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_GROUP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getGroup() { + return group; + } + + @JsonProperty(JSON_PROPERTY_GROUP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setGroup(String group) { + this.group = group; + } + /** Return true if this TemplateResponseDocumentFormFieldCheckbox object is equal to o. */ @Override public boolean equals(Object o) { @@ -104,12 +133,13 @@ public boolean equals(Object o) { TemplateResponseDocumentFormFieldCheckbox templateResponseDocumentFormFieldCheckbox = (TemplateResponseDocumentFormFieldCheckbox) o; return Objects.equals(this.type, templateResponseDocumentFormFieldCheckbox.type) + && Objects.equals(this.group, templateResponseDocumentFormFieldCheckbox.group) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(type, super.hashCode()); + return Objects.hash(type, group, super.hashCode()); } @Override @@ -118,6 +148,7 @@ public String toString() { sb.append("class TemplateResponseDocumentFormFieldCheckbox {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" group: ").append(toIndentedString(group)).append("\n"); sb.append("}"); return sb.toString(); } @@ -145,6 +176,24 @@ public Map createFormData() throws ApiException { map.put("type", JSON.getDefault().getMapper().writeValueAsString(type)); } } + if (group != null) { + if (isFileTypeOrListOfFiles(group)) { + fileTypeFound = true; + } + + if (group.getClass().equals(java.io.File.class) + || group.getClass().equals(Integer.class) + || group.getClass().equals(String.class) + || group.getClass().isEnum()) { + map.put("group", group); + } else if (isListOfFile(group)) { + for (int i = 0; i < getListSize(group); i++) { + map.put("group[" + i + "]", getFromList(group, i)); + } + } else { + map.put("group", JSON.getDefault().getMapper().writeValueAsString(group)); + } + } } catch (Exception e) { throw new ApiException(e); } diff --git a/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldDateSigned.java b/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldDateSigned.java index 47a664a..b43906f 100644 --- a/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldDateSigned.java +++ b/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldDateSigned.java @@ -25,7 +25,10 @@ import java.util.Objects; /** This class extends `TemplateResponseDocumentFormFieldBase` */ -@JsonPropertyOrder({TemplateResponseDocumentFormFieldDateSigned.JSON_PROPERTY_TYPE}) +@JsonPropertyOrder({ + TemplateResponseDocumentFormFieldDateSigned.JSON_PROPERTY_TYPE, + TemplateResponseDocumentFormFieldDateSigned.JSON_PROPERTY_GROUP +}) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") @@ -42,6 +45,9 @@ public class TemplateResponseDocumentFormFieldDateSigned public static final String JSON_PROPERTY_TYPE = "type"; private String type = "date_signed"; + public static final String JSON_PROPERTY_GROUP = "group"; + private String group; + public TemplateResponseDocumentFormFieldDateSigned() {} /** @@ -93,6 +99,29 @@ public void setType(String type) { this.type = type; } + public TemplateResponseDocumentFormFieldDateSigned group(String group) { + this.group = group; + return this; + } + + /** + * The name of the group this field is in. If this field is not a group, this defaults to + * `null` except for Radio fields. + * + * @return group + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_GROUP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getGroup() { + return group; + } + + @JsonProperty(JSON_PROPERTY_GROUP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setGroup(String group) { + this.group = group; + } + /** Return true if this TemplateResponseDocumentFormFieldDateSigned object is equal to o. */ @Override public boolean equals(Object o) { @@ -105,12 +134,13 @@ public boolean equals(Object o) { TemplateResponseDocumentFormFieldDateSigned templateResponseDocumentFormFieldDateSigned = (TemplateResponseDocumentFormFieldDateSigned) o; return Objects.equals(this.type, templateResponseDocumentFormFieldDateSigned.type) + && Objects.equals(this.group, templateResponseDocumentFormFieldDateSigned.group) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(type, super.hashCode()); + return Objects.hash(type, group, super.hashCode()); } @Override @@ -119,6 +149,7 @@ public String toString() { sb.append("class TemplateResponseDocumentFormFieldDateSigned {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" group: ").append(toIndentedString(group)).append("\n"); sb.append("}"); return sb.toString(); } @@ -146,6 +177,24 @@ public Map createFormData() throws ApiException { map.put("type", JSON.getDefault().getMapper().writeValueAsString(type)); } } + if (group != null) { + if (isFileTypeOrListOfFiles(group)) { + fileTypeFound = true; + } + + if (group.getClass().equals(java.io.File.class) + || group.getClass().equals(Integer.class) + || group.getClass().equals(String.class) + || group.getClass().isEnum()) { + map.put("group", group); + } else if (isListOfFile(group)) { + for (int i = 0; i < getListSize(group); i++) { + map.put("group[" + i + "]", getFromList(group, i)); + } + } else { + map.put("group", JSON.getDefault().getMapper().writeValueAsString(group)); + } + } } catch (Exception e) { throw new ApiException(e); } diff --git a/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldDropdown.java b/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldDropdown.java index 548aebe..1c6289c 100644 --- a/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldDropdown.java +++ b/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldDropdown.java @@ -25,7 +25,10 @@ import java.util.Objects; /** This class extends `TemplateResponseDocumentFormFieldBase` */ -@JsonPropertyOrder({TemplateResponseDocumentFormFieldDropdown.JSON_PROPERTY_TYPE}) +@JsonPropertyOrder({ + TemplateResponseDocumentFormFieldDropdown.JSON_PROPERTY_TYPE, + TemplateResponseDocumentFormFieldDropdown.JSON_PROPERTY_GROUP +}) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") @@ -42,6 +45,9 @@ public class TemplateResponseDocumentFormFieldDropdown public static final String JSON_PROPERTY_TYPE = "type"; private String type = "dropdown"; + public static final String JSON_PROPERTY_GROUP = "group"; + private String group; + public TemplateResponseDocumentFormFieldDropdown() {} /** @@ -92,6 +98,29 @@ public void setType(String type) { this.type = type; } + public TemplateResponseDocumentFormFieldDropdown group(String group) { + this.group = group; + return this; + } + + /** + * The name of the group this field is in. If this field is not a group, this defaults to + * `null` except for Radio fields. + * + * @return group + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_GROUP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getGroup() { + return group; + } + + @JsonProperty(JSON_PROPERTY_GROUP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setGroup(String group) { + this.group = group; + } + /** Return true if this TemplateResponseDocumentFormFieldDropdown object is equal to o. */ @Override public boolean equals(Object o) { @@ -104,12 +133,13 @@ public boolean equals(Object o) { TemplateResponseDocumentFormFieldDropdown templateResponseDocumentFormFieldDropdown = (TemplateResponseDocumentFormFieldDropdown) o; return Objects.equals(this.type, templateResponseDocumentFormFieldDropdown.type) + && Objects.equals(this.group, templateResponseDocumentFormFieldDropdown.group) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(type, super.hashCode()); + return Objects.hash(type, group, super.hashCode()); } @Override @@ -118,6 +148,7 @@ public String toString() { sb.append("class TemplateResponseDocumentFormFieldDropdown {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" group: ").append(toIndentedString(group)).append("\n"); sb.append("}"); return sb.toString(); } @@ -145,6 +176,24 @@ public Map createFormData() throws ApiException { map.put("type", JSON.getDefault().getMapper().writeValueAsString(type)); } } + if (group != null) { + if (isFileTypeOrListOfFiles(group)) { + fileTypeFound = true; + } + + if (group.getClass().equals(java.io.File.class) + || group.getClass().equals(Integer.class) + || group.getClass().equals(String.class) + || group.getClass().isEnum()) { + map.put("group", group); + } else if (isListOfFile(group)) { + for (int i = 0; i < getListSize(group); i++) { + map.put("group[" + i + "]", getFromList(group, i)); + } + } else { + map.put("group", JSON.getDefault().getMapper().writeValueAsString(group)); + } + } } catch (Exception e) { throw new ApiException(e); } diff --git a/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldHyperlink.java b/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldHyperlink.java index 71ed8a6..b2af4e8 100644 --- a/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldHyperlink.java +++ b/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldHyperlink.java @@ -30,7 +30,8 @@ TemplateResponseDocumentFormFieldHyperlink.JSON_PROPERTY_AVG_TEXT_LENGTH, TemplateResponseDocumentFormFieldHyperlink.JSON_PROPERTY_IS_MULTILINE, TemplateResponseDocumentFormFieldHyperlink.JSON_PROPERTY_ORIGINAL_FONT_SIZE, - TemplateResponseDocumentFormFieldHyperlink.JSON_PROPERTY_FONT_FAMILY + TemplateResponseDocumentFormFieldHyperlink.JSON_PROPERTY_FONT_FAMILY, + TemplateResponseDocumentFormFieldHyperlink.JSON_PROPERTY_GROUP }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", @@ -60,6 +61,9 @@ public class TemplateResponseDocumentFormFieldHyperlink public static final String JSON_PROPERTY_FONT_FAMILY = "fontFamily"; private String fontFamily; + public static final String JSON_PROPERTY_GROUP = "group"; + private String group; + public TemplateResponseDocumentFormFieldHyperlink() {} /** @@ -200,6 +204,29 @@ public void setFontFamily(String fontFamily) { this.fontFamily = fontFamily; } + public TemplateResponseDocumentFormFieldHyperlink group(String group) { + this.group = group; + return this; + } + + /** + * The name of the group this field is in. If this field is not a group, this defaults to + * `null` except for Radio fields. + * + * @return group + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_GROUP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getGroup() { + return group; + } + + @JsonProperty(JSON_PROPERTY_GROUP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setGroup(String group) { + this.group = group; + } + /** Return true if this TemplateResponseDocumentFormFieldHyperlink object is equal to o. */ @Override public boolean equals(Object o) { @@ -222,13 +249,20 @@ public boolean equals(Object o) { templateResponseDocumentFormFieldHyperlink.originalFontSize) && Objects.equals( this.fontFamily, templateResponseDocumentFormFieldHyperlink.fontFamily) + && Objects.equals(this.group, templateResponseDocumentFormFieldHyperlink.group) && super.equals(o); } @Override public int hashCode() { return Objects.hash( - type, avgTextLength, isMultiline, originalFontSize, fontFamily, super.hashCode()); + type, + avgTextLength, + isMultiline, + originalFontSize, + fontFamily, + group, + super.hashCode()); } @Override @@ -241,6 +275,7 @@ public String toString() { sb.append(" isMultiline: ").append(toIndentedString(isMultiline)).append("\n"); sb.append(" originalFontSize: ").append(toIndentedString(originalFontSize)).append("\n"); sb.append(" fontFamily: ").append(toIndentedString(fontFamily)).append("\n"); + sb.append(" group: ").append(toIndentedString(group)).append("\n"); sb.append("}"); return sb.toString(); } @@ -348,6 +383,24 @@ public Map createFormData() throws ApiException { JSON.getDefault().getMapper().writeValueAsString(fontFamily)); } } + if (group != null) { + if (isFileTypeOrListOfFiles(group)) { + fileTypeFound = true; + } + + if (group.getClass().equals(java.io.File.class) + || group.getClass().equals(Integer.class) + || group.getClass().equals(String.class) + || group.getClass().isEnum()) { + map.put("group", group); + } else if (isListOfFile(group)) { + for (int i = 0; i < getListSize(group); i++) { + map.put("group[" + i + "]", getFromList(group, i)); + } + } else { + map.put("group", JSON.getDefault().getMapper().writeValueAsString(group)); + } + } } catch (Exception e) { throw new ApiException(e); } diff --git a/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldInitials.java b/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldInitials.java index b2a1c74..17bc355 100644 --- a/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldInitials.java +++ b/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldInitials.java @@ -25,7 +25,10 @@ import java.util.Objects; /** This class extends `TemplateResponseDocumentFormFieldBase` */ -@JsonPropertyOrder({TemplateResponseDocumentFormFieldInitials.JSON_PROPERTY_TYPE}) +@JsonPropertyOrder({ + TemplateResponseDocumentFormFieldInitials.JSON_PROPERTY_TYPE, + TemplateResponseDocumentFormFieldInitials.JSON_PROPERTY_GROUP +}) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") @@ -42,6 +45,9 @@ public class TemplateResponseDocumentFormFieldInitials public static final String JSON_PROPERTY_TYPE = "type"; private String type = "initials"; + public static final String JSON_PROPERTY_GROUP = "group"; + private String group; + public TemplateResponseDocumentFormFieldInitials() {} /** @@ -92,6 +98,29 @@ public void setType(String type) { this.type = type; } + public TemplateResponseDocumentFormFieldInitials group(String group) { + this.group = group; + return this; + } + + /** + * The name of the group this field is in. If this field is not a group, this defaults to + * `null` except for Radio fields. + * + * @return group + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_GROUP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getGroup() { + return group; + } + + @JsonProperty(JSON_PROPERTY_GROUP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setGroup(String group) { + this.group = group; + } + /** Return true if this TemplateResponseDocumentFormFieldInitials object is equal to o. */ @Override public boolean equals(Object o) { @@ -104,12 +133,13 @@ public boolean equals(Object o) { TemplateResponseDocumentFormFieldInitials templateResponseDocumentFormFieldInitials = (TemplateResponseDocumentFormFieldInitials) o; return Objects.equals(this.type, templateResponseDocumentFormFieldInitials.type) + && Objects.equals(this.group, templateResponseDocumentFormFieldInitials.group) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(type, super.hashCode()); + return Objects.hash(type, group, super.hashCode()); } @Override @@ -118,6 +148,7 @@ public String toString() { sb.append("class TemplateResponseDocumentFormFieldInitials {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" group: ").append(toIndentedString(group)).append("\n"); sb.append("}"); return sb.toString(); } @@ -145,6 +176,24 @@ public Map createFormData() throws ApiException { map.put("type", JSON.getDefault().getMapper().writeValueAsString(type)); } } + if (group != null) { + if (isFileTypeOrListOfFiles(group)) { + fileTypeFound = true; + } + + if (group.getClass().equals(java.io.File.class) + || group.getClass().equals(Integer.class) + || group.getClass().equals(String.class) + || group.getClass().isEnum()) { + map.put("group", group); + } else if (isListOfFile(group)) { + for (int i = 0; i < getListSize(group); i++) { + map.put("group[" + i + "]", getFromList(group, i)); + } + } else { + map.put("group", JSON.getDefault().getMapper().writeValueAsString(group)); + } + } } catch (Exception e) { throw new ApiException(e); } diff --git a/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldRadio.java b/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldRadio.java index a9f1077..75b7a72 100644 --- a/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldRadio.java +++ b/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldRadio.java @@ -25,7 +25,10 @@ import java.util.Objects; /** This class extends `TemplateResponseDocumentFormFieldBase` */ -@JsonPropertyOrder({TemplateResponseDocumentFormFieldRadio.JSON_PROPERTY_TYPE}) +@JsonPropertyOrder({ + TemplateResponseDocumentFormFieldRadio.JSON_PROPERTY_TYPE, + TemplateResponseDocumentFormFieldRadio.JSON_PROPERTY_GROUP +}) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") @@ -41,6 +44,9 @@ public class TemplateResponseDocumentFormFieldRadio extends TemplateResponseDocu public static final String JSON_PROPERTY_TYPE = "type"; private String type = "radio"; + public static final String JSON_PROPERTY_GROUP = "group"; + private String group; + public TemplateResponseDocumentFormFieldRadio() {} /** @@ -90,6 +96,30 @@ public void setType(String type) { this.type = type; } + public TemplateResponseDocumentFormFieldRadio group(String group) { + this.group = group; + return this; + } + + /** + * The name of the group this field is in. If this field is not a group, this defaults to + * `null` except for Radio fields. + * + * @return group + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_GROUP) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getGroup() { + return group; + } + + @JsonProperty(JSON_PROPERTY_GROUP) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setGroup(String group) { + this.group = group; + } + /** Return true if this TemplateResponseDocumentFormFieldRadio object is equal to o. */ @Override public boolean equals(Object o) { @@ -102,12 +132,13 @@ public boolean equals(Object o) { TemplateResponseDocumentFormFieldRadio templateResponseDocumentFormFieldRadio = (TemplateResponseDocumentFormFieldRadio) o; return Objects.equals(this.type, templateResponseDocumentFormFieldRadio.type) + && Objects.equals(this.group, templateResponseDocumentFormFieldRadio.group) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(type, super.hashCode()); + return Objects.hash(type, group, super.hashCode()); } @Override @@ -116,6 +147,7 @@ public String toString() { sb.append("class TemplateResponseDocumentFormFieldRadio {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" group: ").append(toIndentedString(group)).append("\n"); sb.append("}"); return sb.toString(); } @@ -143,6 +175,24 @@ public Map createFormData() throws ApiException { map.put("type", JSON.getDefault().getMapper().writeValueAsString(type)); } } + if (group != null) { + if (isFileTypeOrListOfFiles(group)) { + fileTypeFound = true; + } + + if (group.getClass().equals(java.io.File.class) + || group.getClass().equals(Integer.class) + || group.getClass().equals(String.class) + || group.getClass().isEnum()) { + map.put("group", group); + } else if (isListOfFile(group)) { + for (int i = 0; i < getListSize(group); i++) { + map.put("group[" + i + "]", getFromList(group, i)); + } + } else { + map.put("group", JSON.getDefault().getMapper().writeValueAsString(group)); + } + } } catch (Exception e) { throw new ApiException(e); } diff --git a/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldSignature.java b/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldSignature.java index 4155ba4..15630a4 100644 --- a/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldSignature.java +++ b/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldSignature.java @@ -25,7 +25,10 @@ import java.util.Objects; /** This class extends `TemplateResponseDocumentFormFieldBase` */ -@JsonPropertyOrder({TemplateResponseDocumentFormFieldSignature.JSON_PROPERTY_TYPE}) +@JsonPropertyOrder({ + TemplateResponseDocumentFormFieldSignature.JSON_PROPERTY_TYPE, + TemplateResponseDocumentFormFieldSignature.JSON_PROPERTY_GROUP +}) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0") @@ -42,6 +45,9 @@ public class TemplateResponseDocumentFormFieldSignature public static final String JSON_PROPERTY_TYPE = "type"; private String type = "signature"; + public static final String JSON_PROPERTY_GROUP = "group"; + private String group; + public TemplateResponseDocumentFormFieldSignature() {} /** @@ -93,6 +99,29 @@ public void setType(String type) { this.type = type; } + public TemplateResponseDocumentFormFieldSignature group(String group) { + this.group = group; + return this; + } + + /** + * The name of the group this field is in. If this field is not a group, this defaults to + * `null` except for Radio fields. + * + * @return group + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_GROUP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getGroup() { + return group; + } + + @JsonProperty(JSON_PROPERTY_GROUP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setGroup(String group) { + this.group = group; + } + /** Return true if this TemplateResponseDocumentFormFieldSignature object is equal to o. */ @Override public boolean equals(Object o) { @@ -105,12 +134,13 @@ public boolean equals(Object o) { TemplateResponseDocumentFormFieldSignature templateResponseDocumentFormFieldSignature = (TemplateResponseDocumentFormFieldSignature) o; return Objects.equals(this.type, templateResponseDocumentFormFieldSignature.type) + && Objects.equals(this.group, templateResponseDocumentFormFieldSignature.group) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(type, super.hashCode()); + return Objects.hash(type, group, super.hashCode()); } @Override @@ -119,6 +149,7 @@ public String toString() { sb.append("class TemplateResponseDocumentFormFieldSignature {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" group: ").append(toIndentedString(group)).append("\n"); sb.append("}"); return sb.toString(); } @@ -146,6 +177,24 @@ public Map createFormData() throws ApiException { map.put("type", JSON.getDefault().getMapper().writeValueAsString(type)); } } + if (group != null) { + if (isFileTypeOrListOfFiles(group)) { + fileTypeFound = true; + } + + if (group.getClass().equals(java.io.File.class) + || group.getClass().equals(Integer.class) + || group.getClass().equals(String.class) + || group.getClass().isEnum()) { + map.put("group", group); + } else if (isListOfFile(group)) { + for (int i = 0; i < getListSize(group); i++) { + map.put("group[" + i + "]", getFromList(group, i)); + } + } else { + map.put("group", JSON.getDefault().getMapper().writeValueAsString(group)); + } + } } catch (Exception e) { throw new ApiException(e); } diff --git a/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldText.java b/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldText.java index 070454b..dbb22a6 100644 --- a/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldText.java +++ b/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldText.java @@ -33,7 +33,8 @@ TemplateResponseDocumentFormFieldText.JSON_PROPERTY_IS_MULTILINE, TemplateResponseDocumentFormFieldText.JSON_PROPERTY_ORIGINAL_FONT_SIZE, TemplateResponseDocumentFormFieldText.JSON_PROPERTY_FONT_FAMILY, - TemplateResponseDocumentFormFieldText.JSON_PROPERTY_VALIDATION_TYPE + TemplateResponseDocumentFormFieldText.JSON_PROPERTY_VALIDATION_TYPE, + TemplateResponseDocumentFormFieldText.JSON_PROPERTY_GROUP }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", @@ -118,6 +119,9 @@ public static ValidationTypeEnum fromValue(String value) { public static final String JSON_PROPERTY_VALIDATION_TYPE = "validation_type"; private ValidationTypeEnum validationType; + public static final String JSON_PROPERTY_GROUP = "group"; + private String group; + public TemplateResponseDocumentFormFieldText() {} /** @@ -280,6 +284,29 @@ public void setValidationType(ValidationTypeEnum validationType) { this.validationType = validationType; } + public TemplateResponseDocumentFormFieldText group(String group) { + this.group = group; + return this; + } + + /** + * The name of the group this field is in. If this field is not a group, this defaults to + * `null` except for Radio fields. + * + * @return group + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_GROUP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getGroup() { + return group; + } + + @JsonProperty(JSON_PROPERTY_GROUP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setGroup(String group) { + this.group = group; + } + /** Return true if this TemplateResponseDocumentFormFieldText object is equal to o. */ @Override public boolean equals(Object o) { @@ -302,6 +329,7 @@ public boolean equals(Object o) { && Objects.equals(this.fontFamily, templateResponseDocumentFormFieldText.fontFamily) && Objects.equals( this.validationType, templateResponseDocumentFormFieldText.validationType) + && Objects.equals(this.group, templateResponseDocumentFormFieldText.group) && super.equals(o); } @@ -314,6 +342,7 @@ public int hashCode() { originalFontSize, fontFamily, validationType, + group, super.hashCode()); } @@ -328,6 +357,7 @@ public String toString() { sb.append(" originalFontSize: ").append(toIndentedString(originalFontSize)).append("\n"); sb.append(" fontFamily: ").append(toIndentedString(fontFamily)).append("\n"); sb.append(" validationType: ").append(toIndentedString(validationType)).append("\n"); + sb.append(" group: ").append(toIndentedString(group)).append("\n"); sb.append("}"); return sb.toString(); } @@ -455,6 +485,24 @@ public Map createFormData() throws ApiException { JSON.getDefault().getMapper().writeValueAsString(validationType)); } } + if (group != null) { + if (isFileTypeOrListOfFiles(group)) { + fileTypeFound = true; + } + + if (group.getClass().equals(java.io.File.class) + || group.getClass().equals(Integer.class) + || group.getClass().equals(String.class) + || group.getClass().isEnum()) { + map.put("group", group); + } else if (isListOfFile(group)) { + for (int i = 0; i < getListSize(group); i++) { + map.put("group[" + i + "]", getFromList(group, i)); + } + } else { + map.put("group", JSON.getDefault().getMapper().writeValueAsString(group)); + } + } } catch (Exception e) { throw new ApiException(e); } diff --git a/test_fixtures/ApiAppCreateRequest.json b/test_fixtures/ApiAppCreateRequest.json index ac9729d..2ee8e41 100644 --- a/test_fixtures/ApiAppCreateRequest.json +++ b/test_fixtures/ApiAppCreateRequest.json @@ -18,18 +18,18 @@ "white_labeling_options": { "header_background_color": "#1A1A1A", "legal_version": "terms1", - "link_color": "#00B3E6", - "page_background_color": "#F7F8F9", - "primary_button_color": "#00b3e6", - "primary_button_color_hover": "#00B3E6", + "link_color": "#0061FE", + "page_background_color": "#f7f8f9", + "primary_button_color": "#0061FE", + "primary_button_color_hover": "#0061FE", "primary_button_text_color": "#ffffff", - "primary_button_text_color_hover": "#FFFFFF", - "secondary_button_color": "#FFFFFF", - "secondary_button_color_hover": "#FFFFFF", - "secondary_button_text_color": "#00B3E6", - "secondary_button_text_color_hover": "#00B3E6", + "primary_button_text_color_hover": "#ffffff", + "secondary_button_color": "#ffffff", + "secondary_button_color_hover": "#ffffff", + "secondary_button_text_color": "#0061FE", + "secondary_button_text_color_hover": "#0061FE", "text_color1": "#808080", - "text_color2": "#FFFFFF" + "text_color2": "#ffffff" } } } diff --git a/test_fixtures/ApiAppGetResponse.json b/test_fixtures/ApiAppGetResponse.json index 07843c3..f7d799f 100644 --- a/test_fixtures/ApiAppGetResponse.json +++ b/test_fixtures/ApiAppGetResponse.json @@ -7,7 +7,7 @@ "is_approved": false, "name": "My Production App", "oauth": { - "callback_url": "http://example.com/oauth", + "callback_url": "https://example.com/oauth", "scopes": [ "basic_account_info", "request_signature" @@ -15,13 +15,28 @@ "charges_users": false, "secret": "98891a1b59f312d04cd88e4e0c498d75" }, + "options": { + "can_insert_everywhere": true + }, "owner_account": { "account_id": "dc5deeb9e10b044c591ef2475aafad1d1d3bd888", "email_address": "john@example.com" }, "white_labeling_options": { - "primary_button_color": "#00b3e6", - "primary_button_text_color": "#ffffff" + "header_background_color": "#1A1A1A", + "legal_version": "terms1", + "link_color": "#0061FE", + "page_background_color": "#f7f8f9", + "primary_button_color": "#0061FE", + "primary_button_color_hover": "#0061FE", + "primary_button_text_color": "#ffffff", + "primary_button_text_color_hover": "#ffffff", + "secondary_button_color": "#ffffff", + "secondary_button_color_hover": "#ffffff", + "secondary_button_text_color": "#0061FE", + "secondary_button_text_color_hover": "#0061FE", + "text_color1": "#808080", + "text_color2": "#ffffff" } } } diff --git a/test_fixtures/ApiAppListResponse.json b/test_fixtures/ApiAppListResponse.json index 6bbacb4..cc17d45 100644 --- a/test_fixtures/ApiAppListResponse.json +++ b/test_fixtures/ApiAppListResponse.json @@ -8,7 +8,7 @@ "is_approved": true, "name": "My Production App", "oauth": { - "callback_url": "http://example.com/oauth", + "callback_url": "https://example.com/oauth", "scopes": [ "basic_account_info", "request_signature" @@ -16,6 +16,9 @@ "charges_users": false, "secret": "98891a1b59f312d04cd88e4e0c498d75" }, + "options": { + "can_insert_everywhere": true + }, "owner_account": { "account_id": "dc5deeb9e10b044c591ef2475aafad1d1d3bd888", "email_address": "john@example.com" @@ -27,6 +30,9 @@ "domains": ["example.com"], "is_approved": false, "name": "My Other App", + "options": { + "can_insert_everywhere": true + }, "owner_account": { "account_id": "dc5deeb9e10b044c591ef2475aafad1d1d3bd888", "email_address": "john@example.com" diff --git a/test_fixtures/ApiAppUpdateRequest.json b/test_fixtures/ApiAppUpdateRequest.json index 4744e05..ee4e9ff 100644 --- a/test_fixtures/ApiAppUpdateRequest.json +++ b/test_fixtures/ApiAppUpdateRequest.json @@ -4,7 +4,7 @@ "domains": [ "example.com" ], - "callback_url": "http://example.com/dropboxsign", + "callback_url": "https://example.com/dropboxsign", "oauth": { "callback_url": "https://example.com/oauth", "scopes": [ @@ -18,18 +18,18 @@ "white_labeling_options": { "header_background_color": "#1A1A1A", "legal_version": "terms1", - "link_color": "#00B3E6", - "page_background_color": "#F7F8F9", - "primary_button_color": "#00b3e6", - "primary_button_color_hover": "#00B3E6", + "link_color": "#0061FE", + "page_background_color": "#f7f8f9", + "primary_button_color": "#0061FE", + "primary_button_color_hover": "#0061FE", "primary_button_text_color": "#ffffff", - "primary_button_text_color_hover": "#FFFFFF", - "secondary_button_color": "#FFFFFF", - "secondary_button_color_hover": "#FFFFFF", - "secondary_button_text_color": "#00B3E6", - "secondary_button_text_color_hover": "#00B3E6", + "primary_button_text_color_hover": "#ffffff", + "secondary_button_color": "#ffffff", + "secondary_button_color_hover": "#ffffff", + "secondary_button_text_color": "#0061FE", + "secondary_button_text_color_hover": "#0061FE", "text_color1": "#808080", - "text_color2": "#FFFFFF" + "text_color2": "#ffffff" } } } diff --git a/test_fixtures/FaxGetResponse.json b/test_fixtures/FaxGetResponse.json new file mode 100644 index 0000000..5892719 --- /dev/null +++ b/test_fixtures/FaxGetResponse.json @@ -0,0 +1,23 @@ +{ + "default": { + "fax": { + "fax_id": "c2e9691c85d9d6fa6ae773842e3680b2b8650f1d", + "title": "example title", + "original_title": "example original title", + "subject": "example subject", + "message": "example message", + "metadata": [], + "created_at": 1726774555, + "sender": "me@dropboxsign.com", + "transmissions": [ + { + "recipient": "recipient@dropboxsign.com", + "sender": "me@dropboxsign.com", + "sent_at": 1723231831, + "status_code": "success" + } + ], + "files_url": "https://api.hellosign.com/v3/fax/files/2b388914e3ae3b738bd4e2ee2850c677e6dc53d2", + } + } +} diff --git a/test_fixtures/FaxListResponse.json b/test_fixtures/FaxListResponse.json new file mode 100644 index 0000000..bfa69cd --- /dev/null +++ b/test_fixtures/FaxListResponse.json @@ -0,0 +1,31 @@ +{ + "default": { + "list_info": { + "num_pages": 1, + "num_results": 1, + "page": 1, + "page_size": 1 + }, + "faxes": [ + { + "fax_id": "c2e9691c85d9d6fa6ae773842e3680b2b8650f1d", + "title": "example title", + "original_title": "example original title", + "subject": "example subject", + "message": "example message", + "metadata": [], + "created_at": 1726774555, + "sender": "me@dropboxsign.com", + "transmissions": [ + { + "recipient": "recipient@dropboxsign.com", + "sender": "me@dropboxsign.com", + "sent_at": 1723231831, + "status_code": "success" + } + ], + "files_url": "https://api.hellosign.com/v3/fax/files/2b388914e3ae3b738bd4e2ee2850c677e6dc53d2", + } + ] + } +} diff --git a/test_fixtures/FaxSendRequest.json b/test_fixtures/FaxSendRequest.json new file mode 100644 index 0000000..4c418cb --- /dev/null +++ b/test_fixtures/FaxSendRequest.json @@ -0,0 +1,14 @@ +{ + "default": { + "file_url": [ + "https://api.hellosign.com/v3/fax/files/2b388914e3ae3b738bd4e2ee2850c677e6dc53d2" + ], + "test_mode": "true", + "recipient": "16690000001", + "sender": "16690000000", + "cover_page_to": "Jill Fax", + "cover_page_message": "I'm sending you a fax!", + "cover_page_from": "Faxer Faxerson", + "title": "This is what the fax is about!" + } +} diff --git a/test_fixtures/FaxSendResponse.json b/test_fixtures/FaxSendResponse.json new file mode 100644 index 0000000..b651c78 --- /dev/null +++ b/test_fixtures/FaxSendResponse.json @@ -0,0 +1,16 @@ +{ + "default": { + "fax": { + "fax_id": "c2e9691c85d9d6fa6ae773842e3680b2b8650f1d", + "title": "example title", + "original_title": "example original title", + "subject": "example subject", + "message": "example message", + "metadata": [ ], + "created_at": 1726774555, + "sender": "me@dropboxsign.com", + "transmissions": [], + "files_url": "https://api.hellosign.com/v3/fax/files/2b388914e3ae3b738bd4e2ee2850c677e6dc53d2" + } + } +} diff --git a/test_fixtures/TeamGetResponse.json b/test_fixtures/TeamGetResponse.json index 2ed1d16..327d26c 100644 --- a/test_fixtures/TeamGetResponse.json +++ b/test_fixtures/TeamGetResponse.json @@ -28,6 +28,11 @@ "api_signature_requests_left": 0 } } + ], + "invited_emails": [ + "invite_1@example.com", + "invite_2@example.com", + "invite_3@example.com" ] } } diff --git a/test_fixtures/TemplateGetResponse.json b/test_fixtures/TemplateGetResponse.json index 52ff622..b025913 100644 --- a/test_fixtures/TemplateGetResponse.json +++ b/test_fixtures/TemplateGetResponse.json @@ -5,7 +5,10 @@ "title": "Mutual NDA", "message": "Please sign this NDA as soon as possible.", "updated_at": 1570471067, + "can_edit": true, + "is_creator": true, "is_embedded": false, + "is_locked": false, "metadata": {}, "signer_roles": [ { @@ -566,496 +569,40 @@ ] } ], - "custom_fields": [ - { - "name": "merge_field_1", - "type": "text", - "x": 417, - "y": 219, - "width": 72, - "height": 15, - "required": false, - "api_id": "967c3e5f-2912-4f53-8ea3-c750652d29fc", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 19 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial" - }, - { - "name": "merge_field_2", - "type": "checkbox", - "x": 515, - "y": 346, - "width": 18, - "height": 18, - "required": false, - "api_id": "5e8fe02f-51cf-4f0b-b1d9-2b1e4f6ad07f" - } - ], - "named_form_fields": [ - { - "name": "Signature1", - "type": "signature", - "signer": "1", - "x": 136, - "y": 17, - "width": 108, - "height": 27, - "required": true, - "api_id": "8b6d78a5-0870-4f46-af9c-b78b54a49348" - }, - { - "name": "Textbox1", - "type": "text", - "signer": "1", - "x": 328, - "y": 17, - "width": 144, - "height": 14, - "required": true, - "api_id": "7ec10d80-53c9-433b-b252-0b8daa90a8e0", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 38 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial" - }, - { - "name": "Textbox2", - "type": "text", - "signer": "1", - "x": 328, - "y": 48, - "width": 144, - "height": 14, - "required": true, - "api_id": "6574e6ad-7dac-49a2-9d56-650d7c5ade6e", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 38 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial" - }, - { - "name": "Initial1", - "type": "initials", - "signer": "1", - "x": 148, - "y": 66, - "width": 72, - "height": 27, - "required": true, - "api_id": "30f41f54-c7f3-46c3-a29a-bb76ec40b552" - }, - { - "name": "Checkbox1", - "type": "checkbox", - "signer": "1", - "x": 325, - "y": 111, - "width": 18, - "height": 18, - "required": false, - "api_id": "d4d6ada9-e1dc-419e-bc0d-1478da694449", - "group": "75a6e4b5fea47" - }, - { - "name": "Dropdown1", - "type": "dropdown", - "signer": "1", - "x": 423, - "y": 108, - "width": 70, - "height": 14, - "required": true, - "api_id": "5863be5e-ce5a-4c9d-aabe-c221914d73c2" - }, - { - "name": "DateSigned1", - "type": "date_signed", - "signer": "1", - "x": 150, - "y": 119, - "width": 105, - "height": 18, - "required": true, - "api_id": "9f6d3722-6db7-46da-8fac-3bc09f510262" - }, - { - "name": "Checkbox2", - "type": "checkbox", - "signer": "1", - "x": 325, - "y": 135, - "width": 18, - "height": 18, - "required": false, - "api_id": "edd732b8-b158-4714-a87b-503637d09ded", - "group": "75a6e4b5fea47" - }, - { - "name": "FullName1", - "type": "text", - "signer": "1", - "x": 144, - "y": 158, - "width": 72, - "height": 14, - "required": true, - "api_id": "62fd3f85-4808-4011-8eae-a14ebe9105ef", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 19 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial" - }, - { - "name": "Email1", - "type": "text", - "signer": "1", - "x": 133, - "y": 191, - "width": 144, - "height": 14, - "required": true, - "api_id": "a1c9bc6b-d498-4787-86e0-30ea779f06a7", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 38 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial", - "validation_type": "email_address" - }, - { - "name": "RadioItem1", - "type": "radio", - "signer": "1", - "x": 307, - "y": 211, - "width": 18, - "height": 18, - "required": false, - "api_id": "fc8a1277-f757-47a2-aeea-5113fa81f2d5", - "group": "0831822584086" - }, - { - "name": "Company1", - "type": "text", - "signer": "1", - "x": 128, - "y": 221, - "width": 144, - "height": 14, - "required": true, - "api_id": "279b4e7f-e71f-426d-845c-6308cddde379", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 38 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial" - }, - { - "name": "Title1", - "type": "text", - "signer": "1", - "x": 127, - "y": 250, - "width": 144, - "height": 14, - "required": true, - "api_id": "8809e39a-a46c-4dae-aaf9-06fc6355d80f", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 38 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial" - }, - { - "name": "RadioItem2", - "type": "radio", - "signer": "1", - "x": 307, - "y": 253, - "width": 18, - "height": 18, - "required": false, - "api_id": "f7b6b70d-0522-4ab7-bfec-b86f147c8be3", - "group": "0831822584086" - }, - { - "name": "Textbox3", - "type": "text", - "signer": "1", - "x": 410, - "y": 279, - "width": 144, - "height": 14, - "required": true, - "api_id": "bad7512a-e22b-46ed-ba03-123db0eda932", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 38 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial" - }, - { - "name": "Textbox4", - "type": "text", - "signer": "1", - "x": 101, - "y": 314, - "width": 72, - "height": 14, - "required": true, - "api_id": "368ed029-bc93-4f92-8f7a-14c3bf8109b5", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 19 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial", - "validation_type": "custom_regex" - }, - { - "name": "Textbox8", - "type": "text", - "signer": "1", - "x": 218, - "y": 313, - "width": 72, - "height": 14, - "required": true, - "api_id": "ecf2ae95-d2e6-41b2-819a-836a6fa8c7c5", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 19 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial", - "validation_type": "bank_routing_number" - }, - { - "name": "Textbox12", - "type": "text", - "signer": "1", - "x": 339, - "y": 315, - "width": 72, - "height": 14, - "required": true, - "api_id": "3cb90a0a-a433-4f30-8af8-8fb4c747b704", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 19 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial", - "validation_type": "social_security_number" - }, - { - "name": "Textbox9", - "type": "text", - "signer": "1", - "x": 224, - "y": 343, - "width": 72, - "height": 14, - "required": true, - "api_id": "5b9eb331-c97d-435b-a563-d936a9b930c0", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 19 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial", - "validation_type": "bank_account_number" - }, - { - "name": "Textbox13", - "type": "text", - "signer": "1", - "x": 339, - "y": 345, - "width": 72, - "height": 14, - "required": true, - "api_id": "2b98ce7e-e53a-4cf8-a9f3-d7fb18d88631", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 19 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial", - "validation_type": "employer_identification_number" - }, - { - "name": "Textbox5", - "type": "text", - "signer": "1", - "x": 113, - "y": 350, - "width": 72, - "height": 14, - "required": true, - "api_id": "5f52c011-2c5f-4143-bf04-4694fb4a0d3f", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 19 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial", - "validation_type": "numbers_only" - }, - { - "name": "Textbox6", - "type": "text", - "signer": "1", - "x": 122, - "y": 374, - "width": 72, - "height": 14, - "required": true, - "api_id": "47457b7d-b1e8-41a0-93ad-60ba30e64bb1", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 19 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial", - "validation_type": "letters_only" - }, - { - "name": "Textbox10", - "type": "text", - "signer": "1", - "x": 234, - "y": 373, - "width": 72, - "height": 14, - "required": true, - "api_id": "18e3f994-1675-4d58-9b4a-4f92a2614551", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 19 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial", - "validation_type": "email_address" - }, - { - "name": "Textbox14", - "type": "text", - "signer": "1", - "x": 339, - "y": 376, - "width": 72, - "height": 14, - "required": true, - "api_id": "9ad4b8cc-bac9-432b-8836-9f80f86fc7e0", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 19 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial" - }, - { - "name": "Textbox7", - "type": "text", - "signer": "1", - "x": 130, - "y": 401, - "width": 72, - "height": 14, - "required": true, - "api_id": "58c5f942-04fb-45f1-9703-5e8411f3a3bb", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 19 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial", - "validation_type": "phone_number" - }, - { - "name": "me_now_hyperlink_1", - "type": "hyperlink", - "signer": "me_now", - "x": 434, - "y": 400, - "width": 112, - "height": 14, - "required": false, - "api_id": "fd928b56-cf59-40a4-9a90-62f97ffd0ddc", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 30 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "helvetica" - }, - { - "name": "Textbox11", - "type": "text", - "signer": "1", - "x": 237, - "y": 405, - "width": 72, - "height": 14, - "required": true, - "api_id": "e48c388d-8c26-4f20-848e-f8587a631746", - "avg_text_length": { - "num_lines": 1, - "num_chars_per_line": 19 - }, - "isMultiline": false, - "originalFontSize": 12, - "fontFamily": "arial", - "validation_type": "zip_code" - } - ], "accounts": [ { "account_id": "5008b25c7f67153e57d5a357b1687968068fb465", "email_address": "me@dropboxsign.com", "is_locked": false, "is_paid_hs": false, - "is_paid_hf": false + "is_paid_hf": false, + "quotas": { + "templates_left": 5, + "api_signature_requests_left": 5, + "documents_left": 5, + "sms_verifications_left": 0 + } }, { "account_id": "", "email_address": "teammate@dropboxsign.com", "is_locked": false, "is_paid_hs": false, - "is_paid_hf": false + "is_paid_hf": false, + "quotas": { + "templates_left": 5, + "api_signature_requests_left": 5, + "documents_left": 5, + "sms_verifications_left": 0 + } + } + ], + "attachments": [ + { + "id": "attachment_1", + "signer": "Outside Vendor", + "name": "Attachment #1", + "required": true } ] } diff --git a/test_fixtures/TemplateListResponse.json b/test_fixtures/TemplateListResponse.json index 7c4768b..caa5e6d 100644 --- a/test_fixtures/TemplateListResponse.json +++ b/test_fixtures/TemplateListResponse.json @@ -12,7 +12,10 @@ "title": "Purchase order", "message": "", "updated_at": 1570471067, + "can_edit": true, + "is_creator": true, "is_embedded": false, + "is_locked": false, "metadata": {}, "signer_roles": [ { @@ -49,7 +52,8 @@ "originalFontSize": 12, "fontFamily": "arial" } - ] + ], + "static_fields": [] } ], "accounts": [ @@ -58,7 +62,21 @@ "email_address": "me@dropboxsign.com", "is_locked": false, "is_paid_hs": false, - "is_paid_hf": false + "is_paid_hf": false, + "quotas": { + "templates_left": 5, + "api_signature_requests_left": 5, + "documents_left": 5, + "sms_verifications_left": 0 + } + } + ], + "attachments": [ + { + "id": "attachment_1", + "signer": "Outside Vendor", + "name": "Attachment #1", + "required": true } ] }, @@ -67,7 +85,10 @@ "title": "Mutual NDA", "message": "Please sign this NDA as soon as possible.", "updated_at": 1329478947, + "can_edit": true, + "is_creator": true, "is_embedded": false, + "is_locked": false, "metadata": {}, "signer_roles": [ { @@ -564,7 +585,8 @@ "fontFamily": "arial", "validation_type": "zip_code" } - ] + ], + "static_fields": [] } ], "accounts": [ @@ -573,9 +595,16 @@ "email_address": "me@dropboxsign.com", "is_locked": false, "is_paid_hs": false, - "is_paid_hf": false + "is_paid_hf": false, + "quotas": { + "templates_left": 5, + "api_signature_requests_left": 5, + "documents_left": 5, + "sms_verifications_left": 0 + } } - ] + ], + "attachments": [] } ] }