diff --git a/README.md b/README.md index 9e23234..b71392f 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.8.0 + 2.9.0 compile ``` @@ -72,7 +72,7 @@ Add this dependency to your project's build file: } dependencies { - implementation "com.dropbox.sign:dropbox-sign:2.8.0" + implementation "com.dropbox.sign:dropbox-sign:2.9.0" } ``` @@ -86,7 +86,7 @@ mvn clean package Then manually install the following JARs: -- `target/dropbox-sign-2.8.0.jar` +- `target/dropbox-sign-2.9.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.8.0` + - Package version: `2.9.0` - Build package: `org.openapitools.codegen.languages.JavaClientCodegen` diff --git a/VERSION b/VERSION index 834f262..c8e38b6 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.8.0 +2.9.0 diff --git a/build.gradle b/build.gradle index 884fda2..f17a563 100644 --- a/build.gradle +++ b/build.gradle @@ -7,7 +7,7 @@ plugins { } group = 'com.dropbox.sign' -version = '2.8.0' +version = '2.9.0' base { archivesName.set('dropbox-sign') diff --git a/build.sbt b/build.sbt index d5f9f59..3073fdc 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.8.0", + version := "2.9.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 196afc4..7393dc2 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.8.0 +VERSION_NAME=2.9.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 0bb171d..e203b6e 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.8.0" + artifactVersion: "2.9.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 4d14a5c..36acad2 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ dropbox-sign jar dropbox-sign - 2.8.0 + 2.9.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 bc0fafe..19554e1 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.8.0/java"); + setUserAgent("OpenAPI-Generator/2.9.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 3e57d03..054b0cb 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.8.0"; + public static final String VERSION = "2.9.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 951081d..f02ea38 100644 --- a/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldDropdown.java +++ b/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldDropdown.java @@ -25,7 +25,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; import java.util.Arrays; +import java.util.List; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import com.dropbox.sign.JSON; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @@ -38,7 +40,8 @@ */ @JsonPropertyOrder({ TemplateResponseDocumentFormFieldDropdown.JSON_PROPERTY_TYPE, - TemplateResponseDocumentFormFieldDropdown.JSON_PROPERTY_GROUP + TemplateResponseDocumentFormFieldDropdown.JSON_PROPERTY_GROUP, + TemplateResponseDocumentFormFieldDropdown.JSON_PROPERTY_OPTIONS }) @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties( @@ -56,6 +59,10 @@ public class TemplateResponseDocumentFormFieldDropdown extends TemplateResponseD @jakarta.annotation.Nullable private String group; + public static final String JSON_PROPERTY_OPTIONS = "options"; + @jakarta.annotation.Nullable + private List options = null; + public TemplateResponseDocumentFormFieldDropdown() { } @@ -124,6 +131,39 @@ public void setGroup(@jakarta.annotation.Nullable String group) { } + public TemplateResponseDocumentFormFieldDropdown options(@jakarta.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 + */ + @jakarta.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(@jakarta.annotation.Nullable List options) { + this.options = options; + } + + /** * Return true if this TemplateResponseDocumentFormFieldDropdown object is equal to o. */ @@ -138,12 +178,13 @@ public boolean equals(Object o) { TemplateResponseDocumentFormFieldDropdown templateResponseDocumentFormFieldDropdown = (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 @@ -153,6 +194,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(); } @@ -200,6 +242,25 @@ 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); }