diff --git a/README.md b/README.md index 4373e76..39f2b4a 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.12.0 + 1.13.0 compile ``` @@ -71,7 +71,7 @@ Add this dependency to your project's build file: } dependencies { - implementation "com.dropbox.sign:dropbox-sign:1.12.0" + implementation "com.dropbox.sign:dropbox-sign:1.13.0" } ``` @@ -85,7 +85,7 @@ mvn clean package Then manually install the following JARs: -- `target/dropbox-sign-1.12.0.jar` +- `target/dropbox-sign-1.13.0.jar` - `target/lib/*.jar` ## Getting Started @@ -477,7 +477,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.12.0` + - Package version: `1.13.0` - Build package: `org.openapitools.codegen.languages.JavaClientCodegen` diff --git a/VERSION b/VERSION index 0eed1a2..feaae22 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.12.0 +1.13.0 diff --git a/build.gradle b/build.gradle index d89537c..40479cb 100644 --- a/build.gradle +++ b/build.gradle @@ -7,7 +7,7 @@ plugins { } group = 'com.dropbox.sign' -version = '1.12.0' +version = '1.13.0' base { archivesName.set('dropbox-sign') diff --git a/build.sbt b/build.sbt index edd0ec0..05537b7 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.12.0", + version := "1.13.0", scalaVersion := "2.11.4", scalacOptions ++= Seq("-feature"), Compile / javacOptions ++= Seq("-Xlint:deprecation"), diff --git a/docs/TemplateResponseDocumentFormFieldDropdown.md b/docs/TemplateResponseDocumentFormFieldDropdown.md index 70e5da4..9d975d4 100644 --- a/docs/TemplateResponseDocumentFormFieldDropdown.md +++ b/docs/TemplateResponseDocumentFormFieldDropdown.md @@ -10,6 +10,7 @@ This class extends `TemplateResponseDocumentFormFieldBase` |------------ | ------------- | ------------- | -------------| | `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. | | +| `options` | ```List``` | The options available for this dropdown form field. | | diff --git a/gradle.properties b/gradle.properties index 63b6665..446e538 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.12.0 +VERSION_NAME=1.13.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 139706d..f772d21 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.12.0" + artifactVersion: "1.13.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 ac9e788..576b442 100644 --- a/openapi-sdk.yaml +++ b/openapi-sdk.yaml @@ -13104,6 +13104,11 @@ components: 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 + options: + description: 'The options available for this dropdown form field.' + type: array + items: + type: string type: object TemplateResponseDocumentFormFieldHyperlink: description: 'This class extends `TemplateResponseDocumentFormFieldBase`' diff --git a/pom.xml b/pom.xml index 788c4c1..29cb179 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ dropbox-sign jar dropbox-sign - 1.12.0 + 1.13.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 d0aa94d..1ece0d7 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.12.0/java"); + setUserAgent("OpenAPI-Generator/1.13.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 291d81f..3502780 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.12.0") public class Configuration { - public static final String VERSION = "1.12.0"; + public static final String VERSION = "1.13.0"; private static volatile ApiClient defaultApiClient = new ApiClient(); diff --git a/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldDropdown.java b/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldDropdown.java index 109b341..86de698 100644 --- a/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldDropdown.java +++ b/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldDropdown.java @@ -20,14 +20,17 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder; import com.fasterxml.jackson.annotation.JsonTypeInfo; 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; /** This class extends `TemplateResponseDocumentFormFieldBase` */ @JsonPropertyOrder({ TemplateResponseDocumentFormFieldDropdown.JSON_PROPERTY_TYPE, - TemplateResponseDocumentFormFieldDropdown.JSON_PROPERTY_GROUP + TemplateResponseDocumentFormFieldDropdown.JSON_PROPERTY_GROUP, + TemplateResponseDocumentFormFieldDropdown.JSON_PROPERTY_OPTIONS }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", @@ -48,6 +51,9 @@ public class TemplateResponseDocumentFormFieldDropdown public static final String JSON_PROPERTY_GROUP = "group"; @javax.annotation.Nullable private String group; + public static final String JSON_PROPERTY_OPTIONS = "options"; + @javax.annotation.Nullable private List options = null; + public TemplateResponseDocumentFormFieldDropdown() {} /** @@ -122,6 +128,37 @@ public void setGroup(@javax.annotation.Nullable String group) { this.group = group; } + public TemplateResponseDocumentFormFieldDropdown options( + @javax.annotation.Nullable List options) { + this.options = options; + return this; + } + + public TemplateResponseDocumentFormFieldDropdown addOptionsItem(String optionsItem) { + if (this.options == null) { + this.options = new ArrayList<>(); + } + this.options.add(optionsItem); + return this; + } + + /** + * The options available for this dropdown form field. + * + * @return options + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_OPTIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getOptions() { + return options; + } + + @JsonProperty(JSON_PROPERTY_OPTIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOptions(@javax.annotation.Nullable List options) { + this.options = options; + } + /** Return true if this TemplateResponseDocumentFormFieldDropdown object is equal to o. */ @Override public boolean equals(Object o) { @@ -135,12 +172,13 @@ public boolean equals(Object o) { (TemplateResponseDocumentFormFieldDropdown) o; return Objects.equals(this.type, templateResponseDocumentFormFieldDropdown.type) && Objects.equals(this.group, templateResponseDocumentFormFieldDropdown.group) + && Objects.equals(this.options, templateResponseDocumentFormFieldDropdown.options) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(type, group, super.hashCode()); + return Objects.hash(type, group, options, super.hashCode()); } @Override @@ -150,6 +188,7 @@ public String toString() { 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(" options: ").append(toIndentedString(options)).append("\n"); sb.append("}"); return sb.toString(); } @@ -195,6 +234,24 @@ public Map createFormData() throws ApiException { map.put("group", JSON.getDefault().getMapper().writeValueAsString(group)); } } + if (options != null) { + if (isFileTypeOrListOfFiles(options)) { + fileTypeFound = true; + } + + if (options.getClass().equals(java.io.File.class) + || options.getClass().equals(Integer.class) + || options.getClass().equals(String.class) + || options.getClass().isEnum()) { + map.put("options", options); + } else if (isListOfFile(options)) { + for (int i = 0; i < getListSize(options); i++) { + map.put("options[" + i + "]", getFromList(options, i)); + } + } else { + map.put("options", JSON.getDefault().getMapper().writeValueAsString(options)); + } + } } catch (Exception e) { throw new ApiException(e); }