diff --git a/README.md b/README.md
index 75e5db5..2c9cc93 100644
--- a/README.md
+++ b/README.md
@@ -56,7 +56,7 @@ Add this dependency to your project's POM:
com.dropbox.sign
dropbox-sign
- 2.5.0
+ 2.6.0
compile
```
@@ -72,7 +72,7 @@ Add this dependency to your project's build file:
}
dependencies {
- implementation "com.dropbox.sign:dropbox-sign:2.5.0"
+ implementation "com.dropbox.sign:dropbox-sign:2.6.0"
}
```
@@ -86,7 +86,7 @@ mvn clean package
Then manually install the following JARs:
-- `target/dropbox-sign-2.5.0.jar`
+- `target/dropbox-sign-2.6.0.jar`
- `target/lib/*.jar`
## Getting Started
@@ -453,7 +453,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: `2.5.0`
+ - Package version: `2.6.0`
- Build package: `org.openapitools.codegen.languages.JavaClientCodegen`
diff --git a/VERSION b/VERSION
index 437459c..e70b452 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-2.5.0
+2.6.0
diff --git a/build.gradle b/build.gradle
index 17e70b8..96ad8b9 100644
--- a/build.gradle
+++ b/build.gradle
@@ -21,7 +21,7 @@ apply plugin: 'signing'
group = 'com.dropbox.sign'
archivesBaseName = 'dropbox-sign'
-version = '2.5.0'
+version = '2.6.0'
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
diff --git a/build.sbt b/build.sbt
index 5504b48..4860613 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 := "2.5.0",
+ version := "2.6.0",
scalaVersion := "2.11.4",
scalacOptions ++= Seq("-feature"),
Compile / javacOptions ++= Seq("-Xlint:deprecation"),
diff --git a/docs/OAuthTokenRefreshRequest.md b/docs/OAuthTokenRefreshRequest.md
index f0ce430..bb0a0e5 100644
--- a/docs/OAuthTokenRefreshRequest.md
+++ b/docs/OAuthTokenRefreshRequest.md
@@ -10,8 +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. | |
+| `clientId` | ```String``` | The client ID for your API app. Required for new API apps. To enhance security, we recommend making it required for existing apps in your app settings. | |
+| `clientSecret` | ```String``` | The client secret for your API app. Required for new API apps. To enhance security, we recommend making it required for existing apps in your app settings. | |
diff --git a/docs/ReportCreateRequest.md b/docs/ReportCreateRequest.md
index d2f4b67..7839030 100644
--- a/docs/ReportCreateRequest.md
+++ b/docs/ReportCreateRequest.md
@@ -20,6 +20,7 @@
---- | -----
| USER_ACTIVITY | "user_activity" |
| DOCUMENT_STATUS | "document_status" |
+| SMS_ACTIVITY | "sms_activity" |
diff --git a/docs/ReportResponse.md b/docs/ReportResponse.md
index b48dde6..aa74d68 100644
--- a/docs/ReportResponse.md
+++ b/docs/ReportResponse.md
@@ -21,6 +21,7 @@ Contains information about the report request.
---- | -----
| USER_ACTIVITY | "user_activity" |
| DOCUMENT_STATUS | "document_status" |
+| SMS_ACTIVITY | "sms_activity" |
diff --git a/docs/TemplateResponseDocumentFormFieldText.md b/docs/TemplateResponseDocumentFormFieldText.md
index 49cdfaa..1b8d78c 100644
--- a/docs/TemplateResponseDocumentFormFieldText.md
+++ b/docs/TemplateResponseDocumentFormFieldText.md
@@ -14,6 +14,8 @@ 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. | |
+| `validationCustomRegex` | ```String``` | When `validation_type` is set to `custom_regex`, this specifies the custom regular expression pattern that will be used to validate the text field. | |
+| `validationCustomRegexFormatLabel` | ```String``` | When `validation_type` is set to `custom_regex`, this specifies the error message displayed to the signer when the text does not match the provided regex pattern. | |
| `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/gradle.properties b/gradle.properties
index 4078510..1bba36c 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -6,7 +6,7 @@
#target = android
GROUP=com.dropbox.sign
POM_ARTIFACT_ID=dropbox-sign
-VERSION_NAME=2.5.0
+VERSION_NAME=2.6.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 7bb9ce6..d91d52a 100644
--- a/openapi-config.yaml
+++ b/openapi-config.yaml
@@ -18,7 +18,7 @@ additionalProperties:
groupId: com.dropbox.sign
artifactId: dropbox-sign
artifactName: Dropbox Sign Java SDK
- artifactVersion: "2.5.0"
+ artifactVersion: "2.6.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 c832450..c123c2e 100644
--- a/openapi-sdk.yaml
+++ b/openapi-sdk.yaml
@@ -7797,7 +7797,7 @@ components:
type: array
items:
type: string
- maxItems: 2
+ maxItems: 10
minItems: 1
name:
description: 'The name you want to assign to the ApiApp.'
@@ -7823,7 +7823,7 @@ components:
type: array
items:
type: string
- maxItems: 2
+ maxItems: 10
name:
description: 'The name you want to assign to the ApiApp.'
type: string
@@ -8112,10 +8112,10 @@ components:
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.'
+ description: 'The client ID for your API app. Required for new API apps. To enhance security, we recommend making it required for existing apps in your app settings.'
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.'
+ description: 'The client secret for your API app. Required for new API apps. To enhance security, we recommend making it required for existing apps in your app settings.'
type: string
type: object
ReportCreateRequest:
@@ -8135,6 +8135,7 @@ components:
enum:
- user_activity
- document_status
+ - sms_activity
maxItems: 2
minItems: 1
start_date:
@@ -11964,6 +11965,7 @@ components:
enum:
- user_activity
- document_status
+ - sms_activity
type: object
x-internal-class: true
SignatureRequestResponse:
@@ -13130,6 +13132,14 @@ components:
- employer_identification_number
- custom_regex
nullable: true
+ validation_custom_regex:
+ description: 'When `validation_type` is set to `custom_regex`, this specifies the custom regular expression pattern that will be used to validate the text field.'
+ type: string
+ nullable: true
+ validation_custom_regex_format_label:
+ description: 'When `validation_type` is set to `custom_regex`, this specifies the error message displayed to the signer when the text does not match the provided regex pattern.'
+ type: string
+ 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
diff --git a/pom.xml b/pom.xml
index ee9e7fb..716bfde 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
dropbox-sign
jar
dropbox-sign
- 2.5.0
+ 2.6.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/src/main/java/com/dropbox/sign/ApiClient.java b/src/main/java/com/dropbox/sign/ApiClient.java
index 3ba325f..d9c93f2 100644
--- a/src/main/java/com/dropbox/sign/ApiClient.java
+++ b/src/main/java/com/dropbox/sign/ApiClient.java
@@ -159,7 +159,7 @@ public ApiClient(Map authMap) {
this.dateFormat = new RFC3339DateFormat();
// Set default User-Agent.
- setUserAgent("OpenAPI-Generator/2.5.0/java");
+ setUserAgent("OpenAPI-Generator/2.6.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 39af453..2112550 100644
--- a/src/main/java/com/dropbox/sign/Configuration.java
+++ b/src/main/java/com/dropbox/sign/Configuration.java
@@ -15,7 +15,7 @@
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0")
public class Configuration {
- public static final String VERSION = "2.5.0";
+ public static final String VERSION = "2.6.0";
private static volatile ApiClient defaultApiClient = new ApiClient();
diff --git a/src/main/java/com/dropbox/sign/model/OAuthTokenRefreshRequest.java b/src/main/java/com/dropbox/sign/model/OAuthTokenRefreshRequest.java
index 550d2ee..3a059a0 100644
--- a/src/main/java/com/dropbox/sign/model/OAuthTokenRefreshRequest.java
+++ b/src/main/java/com/dropbox/sign/model/OAuthTokenRefreshRequest.java
@@ -131,7 +131,7 @@ public OAuthTokenRefreshRequest clientId(@jakarta.annotation.Nullable String cli
}
/**
- * 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.
+ * The client ID for your API app. Required for new API apps. To enhance security, we recommend making it required for existing apps in your app settings.
* @return clientId
*/
@jakarta.annotation.Nullable
@@ -156,7 +156,7 @@ public OAuthTokenRefreshRequest clientSecret(@jakarta.annotation.Nullable 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.
+ * The client secret for your API app. Required for new API apps. To enhance security, we recommend making it required for existing apps in your app settings.
* @return clientSecret
*/
@jakarta.annotation.Nullable
diff --git a/src/main/java/com/dropbox/sign/model/ReportCreateRequest.java b/src/main/java/com/dropbox/sign/model/ReportCreateRequest.java
index e88dbb0..020326d 100644
--- a/src/main/java/com/dropbox/sign/model/ReportCreateRequest.java
+++ b/src/main/java/com/dropbox/sign/model/ReportCreateRequest.java
@@ -52,7 +52,9 @@ public class ReportCreateRequest {
public enum ReportTypeEnum {
USER_ACTIVITY(String.valueOf("user_activity")),
- DOCUMENT_STATUS(String.valueOf("document_status"));
+ DOCUMENT_STATUS(String.valueOf("document_status")),
+
+ SMS_ACTIVITY(String.valueOf("sms_activity"));
private String value;
diff --git a/src/main/java/com/dropbox/sign/model/ReportResponse.java b/src/main/java/com/dropbox/sign/model/ReportResponse.java
index 35770fa..18b6f39 100644
--- a/src/main/java/com/dropbox/sign/model/ReportResponse.java
+++ b/src/main/java/com/dropbox/sign/model/ReportResponse.java
@@ -61,7 +61,9 @@ public class ReportResponse {
public enum ReportTypeEnum {
USER_ACTIVITY(String.valueOf("user_activity")),
- DOCUMENT_STATUS(String.valueOf("document_status"));
+ DOCUMENT_STATUS(String.valueOf("document_status")),
+
+ SMS_ACTIVITY(String.valueOf("sms_activity"));
private String value;
diff --git a/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldText.java b/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldText.java
index 7bbb7ca..47567e1 100644
--- a/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldText.java
+++ b/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldText.java
@@ -44,6 +44,8 @@
TemplateResponseDocumentFormFieldText.JSON_PROPERTY_ORIGINAL_FONT_SIZE,
TemplateResponseDocumentFormFieldText.JSON_PROPERTY_FONT_FAMILY,
TemplateResponseDocumentFormFieldText.JSON_PROPERTY_VALIDATION_TYPE,
+ TemplateResponseDocumentFormFieldText.JSON_PROPERTY_VALIDATION_CUSTOM_REGEX,
+ TemplateResponseDocumentFormFieldText.JSON_PROPERTY_VALIDATION_CUSTOM_REGEX_FORMAT_LABEL,
TemplateResponseDocumentFormFieldText.JSON_PROPERTY_GROUP
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0")
@@ -129,6 +131,14 @@ public static ValidationTypeEnum fromValue(String value) {
@jakarta.annotation.Nullable
private ValidationTypeEnum validationType;
+ public static final String JSON_PROPERTY_VALIDATION_CUSTOM_REGEX = "validation_custom_regex";
+ @jakarta.annotation.Nullable
+ private String validationCustomRegex;
+
+ public static final String JSON_PROPERTY_VALIDATION_CUSTOM_REGEX_FORMAT_LABEL = "validation_custom_regex_format_label";
+ @jakarta.annotation.Nullable
+ private String validationCustomRegexFormatLabel;
+
public static final String JSON_PROPERTY_GROUP = "group";
@jakarta.annotation.Nullable
private String group;
@@ -301,6 +311,56 @@ public void setValidationType(@jakarta.annotation.Nullable ValidationTypeEnum va
}
+ public TemplateResponseDocumentFormFieldText validationCustomRegex(@jakarta.annotation.Nullable String validationCustomRegex) {
+ this.validationCustomRegex = validationCustomRegex;
+ return this;
+ }
+
+ /**
+ * When `validation_type` is set to `custom_regex`, this specifies the custom regular expression pattern that will be used to validate the text field.
+ * @return validationCustomRegex
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_VALIDATION_CUSTOM_REGEX)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+
+ public String getValidationCustomRegex() {
+ return validationCustomRegex;
+ }
+
+
+ @JsonProperty(JSON_PROPERTY_VALIDATION_CUSTOM_REGEX)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public void setValidationCustomRegex(@jakarta.annotation.Nullable String validationCustomRegex) {
+ this.validationCustomRegex = validationCustomRegex;
+ }
+
+
+ public TemplateResponseDocumentFormFieldText validationCustomRegexFormatLabel(@jakarta.annotation.Nullable String validationCustomRegexFormatLabel) {
+ this.validationCustomRegexFormatLabel = validationCustomRegexFormatLabel;
+ return this;
+ }
+
+ /**
+ * When `validation_type` is set to `custom_regex`, this specifies the error message displayed to the signer when the text does not match the provided regex pattern.
+ * @return validationCustomRegexFormatLabel
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_VALIDATION_CUSTOM_REGEX_FORMAT_LABEL)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+
+ public String getValidationCustomRegexFormatLabel() {
+ return validationCustomRegexFormatLabel;
+ }
+
+
+ @JsonProperty(JSON_PROPERTY_VALIDATION_CUSTOM_REGEX_FORMAT_LABEL)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public void setValidationCustomRegexFormatLabel(@jakarta.annotation.Nullable String validationCustomRegexFormatLabel) {
+ this.validationCustomRegexFormatLabel = validationCustomRegexFormatLabel;
+ }
+
+
public TemplateResponseDocumentFormFieldText group(@jakarta.annotation.Nullable String group) {
this.group = group;
return this;
@@ -344,13 +404,15 @@ public boolean equals(Object o) {
Objects.equals(this.originalFontSize, templateResponseDocumentFormFieldText.originalFontSize) &&
Objects.equals(this.fontFamily, templateResponseDocumentFormFieldText.fontFamily) &&
Objects.equals(this.validationType, templateResponseDocumentFormFieldText.validationType) &&
+ Objects.equals(this.validationCustomRegex, templateResponseDocumentFormFieldText.validationCustomRegex) &&
+ Objects.equals(this.validationCustomRegexFormatLabel, templateResponseDocumentFormFieldText.validationCustomRegexFormatLabel) &&
Objects.equals(this.group, templateResponseDocumentFormFieldText.group) &&
super.equals(o);
}
@Override
public int hashCode() {
- return Objects.hash(type, avgTextLength, isMultiline, originalFontSize, fontFamily, validationType, group, super.hashCode());
+ return Objects.hash(type, avgTextLength, isMultiline, originalFontSize, fontFamily, validationType, validationCustomRegex, validationCustomRegexFormatLabel, group, super.hashCode());
}
@Override
@@ -364,6 +426,8 @@ 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(" validationCustomRegex: ").append(toIndentedString(validationCustomRegex)).append("\n");
+ sb.append(" validationCustomRegexFormatLabel: ").append(toIndentedString(validationCustomRegexFormatLabel)).append("\n");
sb.append(" group: ").append(toIndentedString(group)).append("\n");
sb.append("}");
return sb.toString();
@@ -488,6 +552,44 @@ public Map createFormData() throws ApiException {
map.put("validation_type", JSON.getDefault().getMapper().writeValueAsString(validationType));
}
}
+ if (validationCustomRegex != null) {
+ if (isFileTypeOrListOfFiles(validationCustomRegex)) {
+ fileTypeFound = true;
+ }
+
+ if (validationCustomRegex.getClass().equals(java.io.File.class) ||
+ validationCustomRegex.getClass().equals(Integer.class) ||
+ validationCustomRegex.getClass().equals(String.class) ||
+ validationCustomRegex.getClass().isEnum()) {
+ map.put("validation_custom_regex", validationCustomRegex);
+ } else if (isListOfFile(validationCustomRegex)) {
+ for(int i = 0; i< getListSize(validationCustomRegex); i++) {
+ map.put("validation_custom_regex[" + i + "]", getFromList(validationCustomRegex, i));
+ }
+ }
+ else {
+ map.put("validation_custom_regex", JSON.getDefault().getMapper().writeValueAsString(validationCustomRegex));
+ }
+ }
+ if (validationCustomRegexFormatLabel != null) {
+ if (isFileTypeOrListOfFiles(validationCustomRegexFormatLabel)) {
+ fileTypeFound = true;
+ }
+
+ if (validationCustomRegexFormatLabel.getClass().equals(java.io.File.class) ||
+ validationCustomRegexFormatLabel.getClass().equals(Integer.class) ||
+ validationCustomRegexFormatLabel.getClass().equals(String.class) ||
+ validationCustomRegexFormatLabel.getClass().isEnum()) {
+ map.put("validation_custom_regex_format_label", validationCustomRegexFormatLabel);
+ } else if (isListOfFile(validationCustomRegexFormatLabel)) {
+ for(int i = 0; i< getListSize(validationCustomRegexFormatLabel); i++) {
+ map.put("validation_custom_regex_format_label[" + i + "]", getFromList(validationCustomRegexFormatLabel, i));
+ }
+ }
+ else {
+ map.put("validation_custom_regex_format_label", JSON.getDefault().getMapper().writeValueAsString(validationCustomRegexFormatLabel));
+ }
+ }
if (group != null) {
if (isFileTypeOrListOfFiles(group)) {
fileTypeFound = true;
diff --git a/src/test/java/com/dropbox/sign/api/FaxApiTest.java b/src/test/java/com/dropbox/sign/api/FaxApiTest.java
new file mode 100644
index 0000000..8ddaf58
--- /dev/null
+++ b/src/test/java/com/dropbox/sign/api/FaxApiTest.java
@@ -0,0 +1,69 @@
+package com.dropbox.sign.api;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.eq;
+
+import com.dropbox.sign.ApiClient;
+import com.dropbox.sign.TestHelper;
+import com.dropbox.sign.model.*;
+import com.fasterxml.jackson.databind.JsonNode;
+import java.io.File;
+import java.util.Arrays;
+import java.util.HashMap;
+import org.junit.jupiter.api.Test;
+import org.mockito.Mockito;
+
+public class FaxApiTest {
+ @Test
+ public void faxSendTest() throws Exception {
+ JsonNode expectedResponseData =
+ TestHelper.getJsonContents(FaxGetResponse.class.getSimpleName());
+ FaxGetResponse expectedResponse =
+ FaxGetResponse.init(expectedResponseData.toString());
+ ApiClient apiClient = TestHelper.setUpMock(200, expectedResponse);
+
+ JsonNode requestData =
+ TestHelper.getJsonContents(
+ FaxSendRequest.class.getSimpleName());
+
+ FaxSendRequest request =
+ FaxSendRequest.init(requestData.toString());
+ request.addFilesItem(new File("test_fixtures/pdf-sample.pdf"));
+
+ FaxApi api = new FaxApi(apiClient);
+ FaxGetResponse response = api.faxSend(request);
+
+ assertEquals(expectedResponse, response);
+ }
+
+ @Test
+ public void faxGetTest() throws Exception {
+ String faxId = "c2e9691c85d9d6fa6ae773842e3680b2b8650f1d";
+
+ JsonNode expectedResponseData =
+ TestHelper.getJsonContents(FaxGetResponse.class.getSimpleName());
+ FaxGetResponse expectedResponse =
+ FaxGetResponse.init(expectedResponseData.toString());
+ ApiClient apiClient = TestHelper.setUpMock(200, expectedResponse);
+
+ FaxApi api = new FaxApi(apiClient);
+ FaxGetResponse response = api.faxGet(faxId);
+
+ assertEquals(expectedResponse, response);
+ }
+
+ @Test
+ public void faxListTest() throws Exception {
+ JsonNode expectedResponseData =
+ TestHelper.getJsonContents(FaxListResponse.class.getSimpleName());
+ FaxListResponse expectedResponse =
+ FaxListResponse.init(expectedResponseData.toString());
+ ApiClient apiClient = TestHelper.setUpMock(200, expectedResponse);
+
+ FaxApi api = new FaxApi(apiClient);
+ FaxListResponse response = api.faxList();
+
+ assertEquals(expectedResponse, response);
+ }
+}
diff --git a/src/test/java/com/dropbox/sign/api/FaxLineApiTest.java b/src/test/java/com/dropbox/sign/api/FaxLineApiTest.java
new file mode 100644
index 0000000..5e805a7
--- /dev/null
+++ b/src/test/java/com/dropbox/sign/api/FaxLineApiTest.java
@@ -0,0 +1,68 @@
+package com.dropbox.sign.api;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.eq;
+
+import com.dropbox.sign.ApiClient;
+import com.dropbox.sign.TestHelper;
+import com.dropbox.sign.model.*;
+import com.fasterxml.jackson.databind.JsonNode;
+import java.io.File;
+import java.util.Arrays;
+import java.util.HashMap;
+import org.junit.jupiter.api.Test;
+import org.mockito.Mockito;
+
+public class FaxLineApiTest {
+ @Test
+ public void faxLineCreateTest() throws Exception {
+ JsonNode expectedResponseData =
+ TestHelper.getJsonContents(FaxLineResponse.class.getSimpleName());
+ FaxLineResponse expectedResponse =
+ FaxLineResponse.init(expectedResponseData.toString());
+ ApiClient apiClient = TestHelper.setUpMock(200, expectedResponse);
+
+ JsonNode requestData =
+ TestHelper.getJsonContents(
+ FaxLineCreateRequest.class.getSimpleName());
+
+ FaxLineCreateRequest request =
+ FaxLineCreateRequest.init(requestData.toString());
+
+ FaxLineApi api = new FaxLineApi(apiClient);
+ FaxLineResponse response = api.faxLineCreate(request);
+
+ assertEquals(expectedResponse, response);
+ }
+
+ @Test
+ public void faxLineGetTest() throws Exception {
+ String faxLineNumber = "14155557897";
+
+ JsonNode expectedResponseData =
+ TestHelper.getJsonContents(FaxLineResponse.class.getSimpleName());
+ FaxLineResponse expectedResponse =
+ FaxLineResponse.init(expectedResponseData.toString());
+ ApiClient apiClient = TestHelper.setUpMock(200, expectedResponse);
+
+ FaxLineApi api = new FaxLineApi(apiClient);
+ FaxLineResponse response = api.faxLineGet(faxLineNumber);
+
+ assertEquals(expectedResponse, response);
+ }
+
+ @Test
+ public void faxLineListTest() throws Exception {
+ JsonNode expectedResponseData =
+ TestHelper.getJsonContents(FaxLineListResponse.class.getSimpleName());
+ FaxLineListResponse expectedResponse =
+ FaxLineListResponse.init(expectedResponseData.toString());
+ ApiClient apiClient = TestHelper.setUpMock(200, expectedResponse);
+
+ FaxLineApi api = new FaxLineApi(apiClient);
+ FaxLineListResponse response = api.faxLineList();
+
+ assertEquals(expectedResponse, response);
+ }
+}
diff --git a/test_fixtures/FaxGetResponse.json b/test_fixtures/FaxGetResponse.json
index 2eda936..0d668e0 100644
--- a/test_fixtures/FaxGetResponse.json
+++ b/test_fixtures/FaxGetResponse.json
@@ -20,12 +20,11 @@
"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",
+ "files_url": "https://api.hellosign.com/v3/fax/files/2b388914e3ae3b738bd4e2ee2850c677e6dc53d2"
}
}
}
diff --git a/test_fixtures/FaxLineCreateRequest.json b/test_fixtures/FaxLineCreateRequest.json
new file mode 100644
index 0000000..91d11c8
--- /dev/null
+++ b/test_fixtures/FaxLineCreateRequest.json
@@ -0,0 +1,6 @@
+{
+ "default": {
+ "country": "US",
+ "area_code": 949
+ }
+}
diff --git a/test_fixtures/FaxLineListResponse.json b/test_fixtures/FaxLineListResponse.json
new file mode 100644
index 0000000..c241c1b
--- /dev/null
+++ b/test_fixtures/FaxLineListResponse.json
@@ -0,0 +1,26 @@
+{
+ "default": {
+ "list_info": {
+ "num_pages": 1,
+ "num_results": 1,
+ "page": 1,
+ "page_size": 1
+ },
+ "fax_lines": [
+ {
+ "number": "14155557897",
+ "created_at": 1750196223,
+ "updated_at": 1750196223,
+ "accounts": [
+ {
+ "account_id": "a3367a4130f3624687ea7de6f09df951a44923dd",
+ "email_address": "me@dropboxsign.com",
+ "is_locked": false,
+ "is_paid_hs": false,
+ "is_paid_hf": true
+ }
+ ]
+ }
+ ]
+ }
+}
diff --git a/test_fixtures/FaxLineResponse.json b/test_fixtures/FaxLineResponse.json
new file mode 100644
index 0000000..3855a8a
--- /dev/null
+++ b/test_fixtures/FaxLineResponse.json
@@ -0,0 +1,18 @@
+{
+ "default": {
+ "fax_line": {
+ "number": "14155557897",
+ "created_at": 1750196223,
+ "updated_at": 1750196223,
+ "accounts": [
+ {
+ "account_id": "a3367a4130f3624687ea7de6f09df951a44923dd",
+ "email_address": "me@dropboxsign.com",
+ "is_locked": false,
+ "is_paid_hs": false,
+ "is_paid_hf": true
+ }
+ ]
+ }
+ }
+}
diff --git a/test_fixtures/FaxListResponse.json b/test_fixtures/FaxListResponse.json
index a9ebf63..d0ce7fe 100644
--- a/test_fixtures/FaxListResponse.json
+++ b/test_fixtures/FaxListResponse.json
@@ -27,12 +27,11 @@
"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",
+ "files_url": "https://api.hellosign.com/v3/fax/files/2b388914e3ae3b738bd4e2ee2850c677e6dc53d2"
}
]
}
diff --git a/test_fixtures/FaxResponse.json b/test_fixtures/FaxResponse.json
new file mode 100644
index 0000000..32a44d5
--- /dev/null
+++ b/test_fixtures/FaxResponse.json
@@ -0,0 +1,24 @@
+{
+ "default": {
+ "fax": {
+ "fax_id": "c2e9691c85d9d6fa6ae773842e3680b2b8650f1d",
+ "title": "example title",
+ "original_title": "example original title",
+ "metadata": {},
+ "created_at": 1750105080,
+ "sender": "14155557068",
+ "files_url": "https://api.hellosign.com/v3/fax/files/2b388914e3ae3b738bd4e2ee2850c677e6dc53d2",
+ "final_copy_uri": "/v3/transmission/final_copy/c2e9691c85d9d6fa6ae773842e3680b2b8650f1d",
+ "transmissions": [
+ {
+ "recipient": "18005550199",
+ "status_code": "transmitting"
+ }
+ ],
+ "transmission_id": "c2e9691c85d9d6fa6ae773842e3680b2b8650f1d",
+ "from": "14155557068",
+ "test_mode": false
+ }
+ }
+}
+
diff --git a/test_fixtures/FaxSendResponse.json b/test_fixtures/FaxSendResponse.json
deleted file mode 100644
index b651c78..0000000
--- a/test_fixtures/FaxSendResponse.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- "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"
- }
- }
-}